customMapping problem when implementing dynamic theme switcher
See original GitHub issueIssue type
I’m submitting a … (check one with “x”)
- bug report
- feature request
Issue description
I am trying to implement a theme switcher using KittenTricks and this example in this repo. Everything works as expected until i try to implement a custom font family using customMapping like in this example. If I pass in a customMapping prop, the theme switching breaks and many of the styles no longer change.
Current behavior:
It seems that once an initial customMapping is applied, dynamically switching the theme does not refresh all the styles leaving some aspects of the light theme mixed in with other aspects of the dark theme.
Expected behavior:
Dynamically switching themes when using a customMapping should refresh all the styles.
Steps to reproduce:
Pass in a customMapping into the ApplicationProvider when using a theme switcher like in this example
Related code:
I’m not too familiar with setting up and sharing an Expo playground to provide any samples.
Other information:
OS, device, package version
"react": "16.9.0",
"react-native": "0.61.1",
"@eva-design/eva": "^1.2.0",
"react-native-ui-kitten": "^4.2.0",
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top GitHub Comments
@artyorsh Yes, thank you. I was able to find a work around.
I was generating a customMapping for each of my themes, this is what was giving me the problem. I simplified my customMapping to work for both themes so that it wasn’t something that was affected by switching themes since that prop on the ApplicationProvider no longer changes with the theme switch.
Although I do suspect that If I did need to switch the customMapping I would still have the issue.
Is there any better way to make this work?