roact icon indicating copy to clipboard operation
roact copied to clipboard

Add `isMounted` method to components

Open ZoteTheMighty opened this issue 6 years ago • 0 comments

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.

ZoteTheMighty avatar Mar 02 '19 01:03 ZoteTheMighty