Open
Description
I've found an issue when using virtual components. The teardown function returned from useEffect is never invoked. Also, state remains after a virtual component is unmounted.
The following sandbox uses the same function as both a real component and a virtual component.
When showing/hiding the real component, the count is reset, as expected.
However, when showing/hiding the virtual component, the count remains the same.
Also, as you can see from console.log, the virtual counter's useEffect teardown is never invoked.
https://codesandbox.io/s/mzvrmj2z99
I noticed issue #42, but I don't know if this is related, so I created a new issue.