-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Regression][Navigator] renderScene is called with every route in the routeStack after navigator.push #952
Comments
I will look into this. With typical usage, this shouldn't cause any noticeable bugs. But it will affect performance as you accumulate a lot of scenes and re-render all of them frequently. |
Yup. I expect to have about 50 routes also if the user keeps using the app without going back. Thanks |
I cannot reproduce this issue on the GitHub master. I added the following line to
"Rendering scene: First Scene" only appears once, even as I push on more scenes by tapping "Push from right" |
Ok I can confirm updating to latest master, UIExplorer works fine. RenderScene is called once. I updated react-native in my app also and it seems to call renderScene once only now. Not sure what changed here. Closing it for now. |
Thanks, I'm glad it seems to be fixed! |
I see this issue with latest UIExplorer. I've just added console.log("RENDER SCENE!" ) to renderScene method and got two calls:
Log:
|
@ericvicenti I can reproduce this again(called twice now instead of every route) and the problem is because of this check: eg: say we have routes with index: [0, 1] and push index 2 route. presentIndex=1. That check seems unnecessary also. cc @ide @brentvatne |
cc @hedgerwang |
Let the discussion continue on #3016. Closing for now. |
@chirag04 @ericvicenti Why did we push back on v 0.20 ? |
Hi, I'm running into this issue with v0.21. Is it fixed on a specific version and if so which one would it be? |
I'm experiencing this problem too. I just pushed the details route after user clicked on an item in the list view and render() gets called multiple times. Performance is really taking a toll.
|
I'm also experiencing this behavior with renderScene called two times... Also, when I wrapped the renderScene call in a debounce, it didn't work with trailing or leading invocations. |
@ericvicenti As per our discussion on irc, I think this is a bug. Not sure though.
Also to reproduce:
The text was updated successfully, but these errors were encountered: