Closed JamesHemery closed 9 months ago
+1 still doesn't work with the latest expo-router
@JamesHemery am I correct in saying that this is another example of a memoization problem?
v4.0.0
(beta available now with npm install twrnc@next
) exposes a memoization buster (tw.memoBuster
) that can be passed as a key to break memoization, formalizing what I proposed in #112.
assuming I'm understanding correctly that this is at it's core, another manifestation of memoization, i'd like to close this and consolidate further discussions about memoization in #112.
I can confirm that this issue is resolved in v4, thanks @JamesHemery
I've tried putting id={tw.memoBuster}
and key={tw.memoBuster}
in all my navigators (Stacks, Tabs etc) but it still hasn't fixed it for me. Would you be able to share what you did specifically to fix it?
When using Expo Router and add
useDeviceContext
to root layout (app/_layout.tsx
) the screen will not be re-render when dimensions or scheme change. The layout is well re-rendered but the screen isn't.Temp workaround:
See https://github.com/expo/router/discussions/721