Describe the bug
Install the router listener example and add a didUnmount() with console.log() to every component, like there is already for the didMount():
Have a question?
This might not be a big issue but this is very confusing. I spent hours testing with jest why components on my adapter unmount for no reason. Finally when I reproduced with router listener example, I recognized this is default behaviour.
It would be great if we can fix this issue, since it might confuse people when debugging. If this is and should be default behaviour this should be written as notice in the docs.
This is the normal behavior. didMount() will only be called once the node has been detached from the DOM.
Yes, maybe we should add a notice to the documentation.
Describe the bug Install the router listener example and add a
didUnmount()
withconsole.log()
to every component, like there is already for thedidMount()
:Run the app, click on About then Blog 219. You will see the console output in this order:
Have a question? This might not be a big issue but this is very confusing. I spent hours testing with jest why components on my adapter unmount for no reason. Finally when I reproduced with router listener example, I recognized this is default behaviour. It would be great if we can fix this issue, since it might confuse people when debugging. If this is and should be default behaviour this should be written as notice in the docs.