As we move closer to officially deprecating isMounted, it’s worth understanding why the function is an antipattern, and how to write code without the isMounted function. The primary use case for isMounted() is to avoid calling setState() after a component has unmounted, because calling setStat…