-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Prop/State change of Parent is causing child components to Re-mount #2886
Comments
For now I have resolved this by returning false from shouldComponentUpdate in Parent. I think its not feasible to re-render the component where u declared Router |
Still issue is there now Parent Component where Router is defined doesn't re-renders, but some the active scene does following on redux state change which is connected to parent component WillMount |
First, you should have a Stack/Scene with the key 'root' as a Parent. Second, why are you doing this ? |
@KunwarSingh status there? |
Please try to reproduce it with Example project and latest version 4.0.0-beta.40. Feel free to open if the issue still exists Closed due inactivity |
@Blapi Feel free to close inactive tickets, thanks |
Version
Tell us which versions you are using:
Code
Parent
`
render () {
<Scene
key="Child1"
component={Child1}
`
Expected behaviour
on prop/state change of parent component which is connected to redux, only parent component should re-render, and also those child components which have same redux state connected.
Actual behaviour
on state/prop change in parent, Its re-mounting the child component, which triggers re-render, componentDidMount again for child
Assumption
I believe issue is in the way u initialize Router and Scenes, I didn't had any issue in earlier version
The text was updated successfully, but these errors were encountered: