window is not defined
React and NextJS can throw some interesting problems
When working with React and NextJS, sometimes you’re likely to see `window is not defined` errors. This is because the window object isn’t defined when the code is executed. Sometimes with JS, you wish it would just shut the hell up because of it’s dynamic nature, but alas, it doesn’t and you have to deal with it.
Vincent Voyer’s excellent post is here: https://dev.to/vvo/how-to-solve-window-is-not-defined-errors-in-react-and-next-js-5f97
Thanks for reading Built.fm! Subscribe for free to receive new posts and support my work.