Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Next/dynamic vs React.lazy_

$
0
0

Is there a difference in performance or any other caveat between using

module Ui = {
  let make = React.lazy_(() => Js.import(PWindow_ui.make))
}

versus

// this is JS but I would bind it to ReScript
import dynamic from 'next/dynamic'
 
// Client Components:
const ComponentA = dynamic(() => import('../components/A'))

See also
Using dynamic imports in NextJS


Viewing all articles
Browse latest Browse all 2592

Trending Articles