Component not unmounting on goBack()
Hi, I am facing an issue with a fairly simple usage of this module. I am finding that after calling goBack() on the router it does not trigger a componentWillUnmount(). Here is my route configuration:
<Router history={nativeHistory}>
<StackRoute path="master" component={App}>
<Route
path="/" component={ChatPage} overlayComponent={(props)=><DefaultHeader {...props} title="Home"/>}/>
<Route
path="/chat/:name/:id" component={RoomPage} overlayComponent={(props)=><DefaultHeader {...props} title={props.params.name}/>}/>
<Route
path="/other" component={OtherPage} overlayComponent={(props)=><DefaultHeader {...props} title="Other Page"/>}/>
</StackRoute>
</Router>
What seems to happen is, if I use router.push() to go from path "/" to "/chat/:name/:id" I get a call to componentDidMount() and componentWillReceiveProps(). On calling router.goBack(), componentWillUnmount() is not triggered. If I go back to the exact same chat link then it will call componentDidMount() and componentWillReceiveProps() again.
Version
| Dependency | Version |
|---|---|
| react-router-native | 2.0.0-beta.0 |
| react-router | N/A |
| react-native | 0.37.0 |
Very similar situation ,when push from one screen to next, did not fire componentWillUnmount
Seeing the same issue. Any updates on this?
I am facing the same issue. Is there a solution?