Skip to content

Instantly share code, notes, and snippets.

@weianofsteel
Created March 4, 2021 15:23
Show Gist options
  • Save weianofsteel/4cc716248041e911a7714438453829b6 to your computer and use it in GitHub Desktop.
Save weianofsteel/4cc716248041e911a7714438453829b6 to your computer and use it in GitHub Desktop.
dynamic with loading
import dynamic from 'next/dynamic'
const Sample = dynamic(
() => import('../Sample.js'),
{ loading: ()=> <p>loading...</p> }
)
Const Demo = () => {
return (
<React.Fragment>
<Sample/>
</React.Fragment>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment