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

Issue with back button not unmounting and remount tab scene #2257

Closed
isAlmogK opened this issue Aug 17, 2017 · 10 comments
Closed

Issue with back button not unmounting and remount tab scene #2257

isAlmogK opened this issue Aug 17, 2017 · 10 comments

Comments

@isAlmogK
Copy link

Version
"react": "16.0.0-alpha.12",
"react-native": "0.46.4",
"react-native-router-flux": "4.0.0-beta.14",

When I click the back button and go to my teams view to select a different team my photos view which are under a different tab is not re mounting, so I can't load the new data. I need to be able to re mount a tab view it seems that it's always cached

You can see the issue here
example

@aksonov
Copy link
Owner

aksonov commented Aug 18, 2017

It is how tabbar works - it doesn't remount anything. Use Actions.refresh to update props.

@aksonov aksonov closed this as completed Aug 18, 2017
@isAlmogK
Copy link
Author

I tried Actions.refresh it doesn't help in this case

@aksonov
Copy link
Owner

aksonov commented Aug 18, 2017

Okey, it is about your app state management, not navigation.
You could try to use onEnter handler (as static function) for Photos screen to get photos for 'active' screen. Also you could (or even should) use Redux or Mobx to re-render photos once home is changed.

@isAlmogK
Copy link
Author

Yea I'm using Redux, the core issue is with the EasyListView package that I'm using, which is not rendering when props

@aksonov
Copy link
Owner

aksonov commented Aug 18, 2017

So it is not problem of RNRF.

@isAlmogK
Copy link
Author

No I don't think so, my idea was to see if I can force an unmount and mount which would make it work

@isAlmogK
Copy link
Author

I thought RNRF back button should unmount the tab compount

@aksonov
Copy link
Owner

aksonov commented Aug 18, 2017

No. It is how react-navigation works and how tabbar works. Why you can't use onEnter, onExit?

@aksonov
Copy link
Owner

aksonov commented Aug 18, 2017

Btw, always try to use LATEST beta (or even master) before creating an issue.

@isAlmogK
Copy link
Author

Ok I thought I was on the latest version

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

No branches or pull requests

2 participants