SSR Memory Leak Fix
As described in #11, when using componentWillMount
to set up visibility handlers, it would create a leak in server-side environments where componentWillUnmount
is not called to clean up the handler.
This release uses componentDidMount
to set up the handlers, such that it is also not called on the server to be cleaned up.
Thanks to @the83 for identifying the problem and for the fix! 🎉