We need to be careful about running side effects on unmounted components, so comments like this one come up in code review a lot:
> Please add an isMounted() check inside the callback here (ie. use the useIsMounted hook from frontend-js-react-web).
In this LPS we should do the first of two or three things:
- Make a "useDelay" hook to be used in place of "setTimeout" and have it automatically handle the "isMounted" check.
- Later on, add a lint to guard against unsafe "setTimeout" in React components (may be non-trivial, which is why I suggest doing it as a separate step).
- Go back to pulls like the one I linked above and replace existing "setTimeout" usages with "useDelay" instead.