Checks if a component is mounted or not at the time. Useful for async effects
import { useEffect } from "react"; import { useGetIsMounted } from "rooks"; export default function App() { const getIsMounted = useGetIsMounted(); useEffect(() => { alert("Mounted " + String(getIsMounted())); }, []); return null; }
Join our discord server! You can click the floating discord icon at the bottom right of the screen and chat with us!