GeekyAnts / GeekyAnts/NativeBase

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

Open
#5,761 1 comment 1 reaction 0 assignees View on GitHub
bug triage v3
Dominant language
TypeScript
Stars
20.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Start with the linked Expo Snack and trace how the colorMode manager initializes from async storage during the first render. Reproduce the light-to-dark transition, then verify that the persisted color mode is applied without initially displaying light mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
frontend, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.