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

[Navigator][0.19.0][ios][bug]: Scene Component will render twice and more #5726

Closed
osdio opened this issue Feb 3, 2016 · 5 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@osdio
Copy link

osdio commented Feb 3, 2016

I have use rn before, and code a app in react-native. But the old rn don't rerender a component when pop back to the last scene.

But now I found that:

  • when load to the initial route, the initial route will render, I mean the constructor will run once. +1
  • when I push to another scene, the initial route component will render, the constructor will run once. +1
  • after push to another scene, and then I pop this scene, and return to initial route, the constructor will run again after the scene didFocus. +1

So the scene state is losing, I don't know whether this is a functional to navigator, but I think this is a bug. It just like the web, it can't cache the last scene state, so and it make the navigator so slow.

@facebook-github-bot
Copy link
Contributor

Hey soliury, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@osdio osdio changed the title [Navigator][bugs]: Scene Component will render twice and more [Navigator][0.19.0][ios]: Scene Component will render twice and more Feb 3, 2016
@osdio osdio changed the title [Navigator][0.19.0][ios]: Scene Component will render twice and more [Navigator][0.19.0][ios][bug]: Scene Component will render twice and more Feb 3, 2016
@osdio
Copy link
Author

osdio commented Feb 4, 2016

I have found that: every scene in navigator, it will unmount when push to another scene.

@osdio
Copy link
Author

osdio commented Feb 4, 2016

This must be a bug

osdio referenced this issue Feb 4, 2016
Summary:
Updating range is too complicated. We can keep cached versions of the previously rendered scenes in a map.

@public

Test Plan: Verify that the active scene is the only thing that get re-rendered, and that rendering doesn't happen during transitions or gestures. Test navigation thouroughly in AdsManager
@ndao
Copy link

ndao commented Feb 4, 2016

+1

@chirag04
Copy link
Contributor

chirag04 commented Feb 9, 2016

dupe #3016

@chirag04 chirag04 closed this as completed Feb 9, 2016
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants