Prevent “window is not defined” Errors With a useClientSide() Custom Hook TLDR: There is no window object on the server – trying to access the window object will thrown an error in server side rendered code, and in Node.js based development environments You can access window in a useEffect hook, as uesEffect only runs on…

Read More