Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Responsive) React Navigation memoize screens #186

Closed
JamesHemery opened this issue Aug 4, 2022 · 1 comment
Closed

(Responsive) React Navigation memoize screens #186

JamesHemery opened this issue Aug 4, 2022 · 1 comment

Comments

@JamesHemery
Copy link
Contributor

JamesHemery commented Aug 4, 2022

Hi @jaredh159,

React Navigation memoizes the screens, so when resizing the browser (RN Web), they are not affected by useDeviceContext.

Do you have a better idea than a custom HOC/Hook on all screens (with usage of useFocusEffect) ?

One other is to use children fn, but it break the React Navigation optimizations. (see https://reactnavigation.org/docs/hello-react-navigation#passing-additional-props)

I think that if we find an effective solution, it will have a good place in the documentation :)

@jaredh159
Copy link
Owner

I think this is effectively a duplicate of #112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants