-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[v2] react-native-calendars performance v1 vs v2 #3432
Comments
Hey @ferrannp In v2, we elected to push the screens after the react view is rendered. We felt this is preferable as there will always be a delay between the time a react view is created (in native), and when it is first rendered. We can make this behaviour opt-out, but I really don't think this is desired. I hope these issues will be resolved in the future by the changes detailed in this post, especially the following paragraph on the async nature of RN:
|
Hey @guyca, thanks for your explanation. This was the main reason I moved away from Now here in The However, it would be really nice to have WDYT? |
That's a good idea, making the compromise of supporting opt-out of navigation waiting for react to finish rendering |
After further discussions, we've decided to make this feature opt-in. Meaning that screens will be pushed immediately and will no longer waiting for initial render. To opt-in, enable it in push/showModal animations: options: {
animations: {
push: {
waitForRender: true // Default: false
},
showModal: {
waitForRender: true // Default: false
}
}
} |
This commit introduces an option to control the way components are pushed into the stack. When pushing components into a stack, they are pushed the moment they are measured. If `waitForRender` is true, components will be pushed only after the initial render. api: ```js options: { animations: { push: { waitForRender: true } } } ``` TODO: * Refactor * Add tests Related to #3432
After migrating from 2.0.2354 to 2.0.2399, RNN will no longer wait for the react view to render (like v1). |
As of |
Issue Description
I am trying
react-native-navigation v2
and one of the main reasons for it was to load heavy screens wherereact-navigation
is not really good at it. If I would use the latest, then I'd need to useInteractionManager.runAfterInteractions
and a loading spinner but I would like to avoid that.I was trying the example of
wix/react-native-calendars
which usesreact-native-navigation
1.1.205
and it works as expected, the transition starts immediately and when the content is loaded then it shows, see:I am trying the same approach with
v2
but it seems to work different it has a delay and it shows the screen when the calendar is loaded already. See:I am wondering if I am doing something wrong or something has changed. Is there a way to achieve the same as
v1 react-native-navigation / react-native-calendars
?Environment
The text was updated successfully, but these errors were encountered: