You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cannot access 'window' in server side when building gatsby
Causes of this problem
Kyle said:
during development, react components are only run in the browser where window is defined. When building, Gatsby renders these components on the server where window is not defined
Solutions
access window in componentDidMount
check that window exists before accessing it
The text was updated successfully, but these errors were encountered:
Problem description
Causes of this problem
Kyle said:
during development, react components are only run in the browser where window is defined. When building, Gatsby renders these components on the server where window is not defined
Solutions
The text was updated successfully, but these errors were encountered: