How to dynamically import a component in sitecore jss inside next js application?

114 views Asked by At

I know the conventional way of dynamically importing a component :

const Report = dynamic(() => import('PowerBIComponent'), {
  ssr: false,
});

But since application uses [...path] to catch routes and build page using layout service, I am unable to do that there.

PowerBIComponent is the name of component whose rendering is added on certain route from sitecore.

Can anybody help !

Thanks in advance !!

Tried It using this way but unable to do. const Report = dynamic(() => import('PowerBIComponent'), { ssr: false, });

0

There are 0 answers