Created
June 17, 2023 23:10
-
-
Save JayMGurav/753842b9fbf2e49fe02627485886cfd0 to your computer and use it in GitHub Desktop.
NextJs NoSSR component
This file contains 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
import dynamic from 'next/dynamic' | |
import React from 'react' | |
const NoSsr = props => ( | |
<React.Fragment>{props.children}</React.Fragment> | |
) | |
export default dynamic(() => Promise.resolve(NoSsr), { | |
ssr: false | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment