-
-
Notifications
You must be signed in to change notification settings - Fork 588
feat(Stack): Add support for synchronous state updates on fabric for native stack #3282
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
base: main
Are you sure you want to change the base?
Conversation
b794a54
to
3a71e96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
RCT_EXPORT_VIEW_PROPERTY(leftScrollEdgeEffect, RNSScrollEdgeEffect); | ||
RCT_EXPORT_VIEW_PROPERTY(rightScrollEdgeEffect, RNSScrollEdgeEffect); | ||
RCT_EXPORT_VIEW_PROPERTY(topScrollEdgeEffect, RNSScrollEdgeEffect); | ||
RCT_EXPORT_VIEW_PROPERTY(unstable_synchronousUpdatesEnabled, BOOL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we need this prop on Paper, as it won't work there but we might want to check if there is any warning if you pass a prop that hasn't been exported.
We can also leave the prop exported but for consistency I'd do it in other components as well (e.g. RNSScreenStackHeaderConfig
).
Description
This PR adds support for synchronous updates in the native stack for React Native 0.82+. Currently, enabling synchronous state updates is possible via an experimental feature flag:
unstable_synchronousStateUpdatesEnabled
.At this time, I haven't found a way to perform synchronous updates on Android, so this PR only includes mocks for that platform. I'm creating a ticket for covering that: https://github.com/software-mansion/react-native-screens-labs/issues/497
Fixes https://github.com/software-mansion/react-native-screens-labs/issues/495
Changes
unstable_synchronousStateUpdatesEnabled
for testing synchronous updates.Screenshots / GIFs
Here you can add screenshots / GIFs documenting your change.
You can add before / after section if you're changing some behavior.
Before
before.mov
After
after.mov
Test code and steps to reproduce
Adding a new example, which is verifying that with synchronous updates enabled, the form sheet content flicker issues are resolved.
Checklist