jmurzy / jmurzy/react-router-native

Component not unmounting on goBack()

Open
#65 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
639
Forks
38
PR merge metrics
No merged PRs in 30d

Description

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:

```


}/>
}/>
}/>

```

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 |

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.