Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Don't render the scene twice. #15

Open
chirag04 opened this issue Aug 1, 2016 · 6 comments
Open

Don't render the scene twice. #15

chirag04 opened this issue Aug 1, 2016 · 6 comments
Labels

Comments

@chirag04
Copy link
Contributor

chirag04 commented Aug 1, 2016

from my conversation with @brentvatne on slack. I will try to post repro code soon. Keeping this as a placeholder here on github so that it's not lost in the slack conversations.

@skevy
Copy link
Contributor

skevy commented Aug 6, 2016

Any luck reproducing this?

@skevy skevy added the bug label Aug 24, 2016
@skevy skevy changed the title [bug] don't render the scene twice. Don't render the scene twice. Aug 24, 2016
@chirag04
Copy link
Contributor Author

chirag04 commented Sep 6, 2016

ok. I think I can reproduce this in my app now. I will post an isolated case in some time.

I think it happens when you dismiss a modal. (remove navigator)

@chirag04
Copy link
Contributor Author

chirag04 commented Sep 6, 2016

damn. After debugging, it turns out to be createFocusableComponent which re-renders the scene when it gets focus after a pop.

seems like by default all scene are focus aware and re-renders when they gain focus.

@skevy any way to avoid this?

@brentvatne
Copy link
Member

re-ping @skevy, as I know you're looking into ex-nav stuff atm

@mnichols
Copy link
Contributor

the rerendering on pop just bit me too FYI. The renderLeft component of my route.navigationBar config gets rerendered and not unmounted as I'd expect

@allpwrfulroot
Copy link

Same here, doing a console.log(route) or console.log(props) in renderLeft will print twice

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants