I have a file like this: App.js DrawerNavigator.js StackNavigator.js Home.js Detail.js FAB.js
When I press a button in Detail.js, I change the screen mode to dark mode.
At this time, the backgroundColor transition between Detail.js and Home.js works smoothly.
The header color of the Home and Detail screens defined in Drawer and StackNavigator defined in DrawerNavigator.js, and the color of the floating action button defined in FAB.js do not change.
This is all because the screen mode state is only loaded when the app starts.
But I want the color of the drawer, header, and floating action button all to change when I switch to dark mode.
How can I reload DrawerNavigator.js, StackNavigator.js, FAB.js when a button is clicked in Detail.js? Also, how can I make it run in Detail.js when a button is clicked?
For reference, the first view that runs is set to Home.