i create 2 themes in my react native project and works good.
I just need to change lightMode to darkMode.
To use this theme i just need to import and use:
but now, i need to import lightMode dynamic, i can just use a switch:
but how i can do this, with asyncStorage? Because i need to work with promises:
For such situations,
You need to load all those data into memory from storage(AsyncStorage in this case) right after the app starts.
You can do this while you show the splash screen.