rax-use-unmount Calls a function when the component will unmount. Install $ npm install rax-use-unmount --save Example import { createElement } from 'rax'; import useUnmount from 'rax-use-unmount'; export default function App() { useUnmount(() => { console.log('App will unmount.'); }); }