Skip to content

Instantly share code, notes, and snippets.

@JayMGurav
Created June 17, 2023 23:10
Show Gist options
  • Save JayMGurav/753842b9fbf2e49fe02627485886cfd0 to your computer and use it in GitHub Desktop.
Save JayMGurav/753842b9fbf2e49fe02627485886cfd0 to your computer and use it in GitHub Desktop.
NextJs NoSSR component
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