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

Tabs with fetch not rerendering on changetab #2225

Closed
jaumebosch opened this issue Aug 13, 2017 · 3 comments
Closed

Tabs with fetch not rerendering on changetab #2225

jaumebosch opened this issue Aug 13, 2017 · 3 comments

Comments

@jaumebosch
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta17 (v3 is not supported)
  • react-native v0.45

Expected behaviour

I have 3 tabs each one launching a fetch call on componentDidMount, then it renders a listview, but only the initial tab renders correctly, the other 2 appear in blank

Any idea about how to re-render on changetab?

thanks!

@aksonov
Copy link
Owner

aksonov commented Aug 14, 2017

Have you tried lazy prop to set for tabs scene?

@jaumebosch
Copy link
Author

nope, and it works now!
thanks a lot.

By the way, where can I find the documentation for the tabs? Haven't seen "lazy" option, and also I need to refresh onChangeTab.

Thanks again!

@aksonov
Copy link
Owner

aksonov commented Aug 16, 2017

Use onEnter, onExit props for Scene (or as static functions of component class).
lazy is documented here: https://github.com/aksonov/react-native-router-flux/blob/master/docs/API.md

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

No branches or pull requests

2 participants