Closed little-buddy closed 1 year ago
https://github.com/antonioru/beautiful-react-hooks/blob/519ebf1c7dd3fa01f25cd2e4258495280d415cd3/src/useWillUnmount.ts#L9-L25
By React doc for useEffect
After your component is removed from the DOM, React will run your cleanup function.
So it should called useUnmount
useUnmount
@little-buddy agree, feel free to open a PR
@antonioru awesome!
https://github.com/antonioru/beautiful-react-hooks/blob/519ebf1c7dd3fa01f25cd2e4258495280d415cd3/src/useWillUnmount.ts#L9-L25
By React doc for useEffect
So it should called
useUnmount