AdvancedDynamic Importing Blog using md files Authentication in NextJS Mongodb and NextJS Stripe and NextJS
MiscellaneousDeploying NextJS app on Heroku NextJS Templates NextJS Interview QnA
Loading external JS in NextJSTo load the external JS files, you can use "Script" component from 'next/script'
Loading strategies are mentioned below.
import Script from 'next/script' <Script src="https://xyz.com/abc.js" strategy="lazyOnload" />
- afterInteractive - load after page become interactive
- beforeInteractive - load critical scripts before page is interactive - should be put in _document.js
- lazyOnload - load during idle time
- worker - load in a web worker
Web development and Automation testing