Last active
April 13, 2021 09:09
-
-
Save aolde/e4b73340a2ce8d84460e7bbba078d36a to your computer and use it in GitHub Desktop.
How to test React components work in Server Side Rendering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isBrowserEnv = typeof window !== 'undefined'; | |
if (isBrowserEnv) { | |
// client render | |
// TOOD: Make sure that you move any client only setup here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment