Closed ucheNkadiCode closed 1 year ago
Disabling memoization is not advised because it will rerender every item in the picker uncontrollably.
You can try to force the component to rerender using key
:
<WheelPicker
key={`mode-{isDarkModeEnabled ? 'dark' : 'light'}`}
...
/>
Haven't tried it though.
Closing this, feel free to reopen if the proposed solution does not work.
Hey @erksch forgot to respond! This actually worked for my app and is in production. Thank you!
Thank you for making this package! Definitely a better alternative to the react native wheel picker android package.
My app supports dark mode, but every time I try to change the
itemTextStyle
from white to black based on the Dark Mode theme, no update occurs. It's the same issue if you want certain boolean values to affect the textIn the mean time I simply went to
lib/wheelpickeritem.js
and changedto
However, I don't think this solution is performant