refactor: example app - #5053
Conversation
MikitasK
left a comment
There was a problem hiding this comment.
looks awesome! good job 👍
just a few points to address before merge:
| const resetPreferences = React.useCallback(async () => { | ||
| setShouldUseDynamicTheme(true); | ||
| setIsDarkMode(false); | ||
| setCustomFont(false); | ||
| setRippleEffectEnabled(true); | ||
| setPreferencesVisible(false); |
There was a problem hiding this comment.
what about resetting RTL here as well? currently Reset clears stored preferences but leaves rtl unchanged, so the app can remain in RTL after resetting
I18nManager.forceRTL persists forced direction across restarts
There was a problem hiding this comment.
That one was intentional, RTL in the app requires full app reload. I wanted to keep reset more responsive. That's why no RTL reset. I would keep it that way.
| keyExtractor={({ id }) => id} | ||
| contentContainerStyle={[ | ||
| styles.content, | ||
| { paddingBottom: safeArea.bottom + 16 }, |
There was a problem hiding this comment.
could we also include left & right safe-area insets in horizontal padding?
it's necessary to render list correctly in landscape mode (RN navigation docs)
d553f1e to
803f2c7
Compare
Motivation
PR improves example app. It adds:
Related issue
#4992
Test plan
yarn lint,yarn typecheck,yarn testand a visual check of provided screenshots