React componentWillUnmount doesn't working properly

In F7 with React, the componentWillUnmount is not getting fired by the time I leave the page, it’s getting fired by the time I re-enter to the page from elsewhere page.

For example:
If I am at the homepage and then navigate to the about page, and then clicked on a
<Link href="/homepage/">Homepage</Link> button, just in this time the componentWillUnmount is getting fired!

Isn’t should be fired once I leave the page, rather than once I re-enter it?

BTW: on first time that the page loads, the componentWillUnmount doesn’t getting fired, just when re-navigating to it using the Link component.

Everything is correct. Inspect the DOM and you will see that F7 by default holds previous page in DOM too, which is required for swipeback to work. If you don’t need it then you need to disable preloadPreviousPage and iosSwipeBack View’s parameters http://framework7.io/docs/view.html#view-parameters

Thanks, works as expected!