useIsomorphicLayoutEffect
useIsomorphicLayoutEffect
that does not show warning when server-side rendering, see Alex Reardon's article for more info
Usage
Live Editor
function Demo() { const [value] = useState("useIsomorphicLayoutEffect"); useIsomorphicLayoutEffect(() => { window.console.log(value); }, [value]); return <div>{value}</div>; };
Result
Loading...