Jun 16, 2022
I would strongly caution against using useMount/useUnmount. The whole point of the way unmounting works in useEffect is to be able to run a function that has access to the function closure as it existed the last time that particular useEffect was called. But this list is a great example of why hooks are a bad idea in general. So easy to misuese.