A React Hook that will automatically use React.useLayoutEffect in client side and React.useEffect in server side to avoid the warning of useLayoutEffect
in Server-side Rendering (SSR).
Try to change count and then open DevTools to see the effect.
See API for more details.
Click links below to view source on GitHub.
Same as React.useLayoutEffect.