I\'m working on a Next JS application, and am setting some external state in the cleanup function of a useEffect hook:
useEffect(() => () =&