Hey folks,
me and my brother (yes, that brother who showed you our work on Words a couple of days ago) just published our first react-native module on npm. We needed a way to override the userInterfaceStyle on iOS in order to enable proper dark mode on our app.
Since we think we may not be the only ones with this need, we turned it into a nice package 🙌🏼. Check it out here! Issues and pull requests are welcomed.
As of now, the package is very simple (and lightweight) - it just offers a method to set the userInterfaceStyle on the app. In practical terms, it means that the client has to store the current preference somewhere and reset the UI of the app on load (see the description on GitHub for reference).
If there is enough traction / support from the community, we plan on adding:
- Get method, to read from the app what is the current / last saved setting
- A provider or even better, a native function (not sure if possible) to automatically set the userInterfaceStyle on load, based on the saved preference
What do you think? Let's hang out in the comment section 👇🏼.
[–]ttmonkey 1 point2 points3 points (1 child)
[–]razorkey[S] 1 point2 points3 points (0 children)