Closed olpoco closed 7 years ago
You can use typeof window === 'undefined'
or typeof document === 'undefined'
to check for their existence if that's what you're asking.
Otherwise, make sure that you're using these only on componentDidMount
and never at eval-time.
What's the best way to server side render component that checks uses
window
anddocument
which are only available in the browser?