ReferenceError: window is not defined
Closed this issue · 1 comments
guiaramos commented
givi-phirtskhalava commented
Window object isn't available when rendering on the server. You have to load the module only on the client side, either in useEffect or like below (note the prop disabling ssr):
import dynamic from "next/dynamic";
const Snowfall = dynamic(() => import("react-snowfall"), { ssr: false });