Collecting page data .[ReferenceError: window is not defined] , in nextjs15 #74428
-
Beta Was this translation helpful? Give feedback.
Answered by
icyJoseph
Dec 31, 2024
Replies: 1 comment 9 replies
-
Client Components are still SSR'd. Could you show us more of how the code is accessing |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You don't need those checks in the screenshot. The window object, and document, will be available within the useEffect. Again, only within the useEffect, because it runs only on the browser. Same with local storage, but once again, only inside the useEffect.
Maybe a library you use, used window without guards?