-
Notifications
You must be signed in to change notification settings - Fork 71
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
how to re-render screens/components in tab navigator ? #39
Comments
in my search, these threads has come up. |
So apparently in React-navigation, it is not possible now to re-render a screen on tab change. There is a work around that was merged via react-navigation/react-navigation#1335 which on |
With the help of a hoc I did that on one of my app componentDidUpdate(prevProps) {
if (prevProps.isFocused !== this.props.isFocused) {
this._getInfo();
}
} https://github.com/pmachowski/react-navigation-is-focused-hoc |
Yeah came across that. There is another one as well.
Then gotta do this:
|
O wow thank for this one, :) |
Since we are using redux to control the navigation, is that making the screens inside tab navigator not re- mounting on tab change ? For example, if I go to tab x, and then go to some other tab, then return to tab x again, tab x doesn't remount/reload. if I console log inside componentDidMount, nothing comes out. So the component is being mounted once only. How can we make the component remount everytime the tab change ? thanks in advance
The text was updated successfully, but these errors were encountered: