Too Long; Didn't Read
The useOnUnmount() hook is a functional React alternative to ComponentWillUnmount that allows us to mutate values between renders so that it can be used outside the component. UseOnUpdate() is another useful hook for when we want to trigger an action when the component changes, and not when the state changes. The useEffect() will clean up the previous state before applying the next one. The hook can be found here: useOnUpdate(https://www.hackernoon.com/images/qKpeaoFMpkfgP9RP0ujjUyy9fa42-FB13bitbit-bit-p90vb)