roact
roact copied to clipboard
Add `isMounted` method to components
This will protect against side effects on unmounted components.
Before we do this, it's important to note that React has removed this feature with the following justification: https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
One reason that our case may differ is because the Roblox Lua ecosystem has yielding operations that lack cancellation mechanisms. However, the preferable alternative may be to build wrappers around those operations that introduce an unsubscribe mechanism.