Replies: 2 comments 12 replies
-
In that case, React 18 automatic batching solves it in RNW, so I guess RN doesn't use React 18 yet? |
Beta Was this translation helpful? Give feedback.
5 replies
-
react-native 0.70.2 uses 18.1.0. Is it possible that it still needs to be enabled somewhere? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After I ported my react-native-web app to react-native, child components continue to render one last time after the parent removes it.
I'm providing state via context similar to one of your examples:
The logs are in this order on native:
But on web, it correctly just renders the parent:
So the valtio subscription is reaching the child first essentially, but only on React Native.
Is there something I can do to control the order of subscription notification?
I've designed my app so parent components short-circuit rendering when a given state is no longer available, so children don't have to do
snap.user?.foo
.They can just do
snap.user.foo
and always assume they have auser
object if they rendered in the first place.Any options?
ps. it seems like the classic "zombie" component issue from redux.
Beta Was this translation helpful? Give feedback.
All reactions