Skip to content

SSR Memory Leak Fix

Compare
Choose a tag to compare
@tazsingh tazsingh released this 20 Jun 23:54
· 15 commits to master since this release

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! 🎉