Created
March 4, 2021 15:23
-
-
Save weianofsteel/4cc716248041e911a7714438453829b6 to your computer and use it in GitHub Desktop.
dynamic with loading
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
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