NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

App first loads in light mode then switches theme based on colorMode manager

Open saurabhg138 opened this issue 2 years ago • 1 comments

Description

When we add colorMode manager to persist the color mode in async storage then at first load app is using light colormode and after sometime it switches to colormode from storage

CodeSandbox/Snack link

https://snack.expo.dev/@saurabh772244/nativebase-issue

Steps to reproduce

  1. Go to 'above mentioned snack'
  2. Click on 'launch app'
  3. Check console
  4. See first app is loaded in light mode then it switches to dark

NativeBase Version

3.4.28

Platform

  • [ ] Android
  • [ ] CRA
  • [X] Expo
  • [ ] iOS
  • [ ] Next

Other Platform

No response

Additional Information

No response

saurabhg138 avatar Jul 03 '23 16:07 saurabhg138

Edit: I tried by setting initialColorMode in config but if we set it to light it will flicker in dark mode. If we set to dark it will flicker in light mode

saurabhg138 avatar Jul 03 '23 17:07 saurabhg138