DEV Community

loading...

Discussion on: React.lazy API in 60 seconds (Code-Splitting with Suspense)

Collapse
thidasapankaja profile image
Thidasa Pankaja Paranavitharana

Hi,
Can this be used for static sites such as Gatsby? Because I just tried with Gatsby and I'm getting build errors.

Collapse
siddharthkp profile image
Sid Author

I'm not sure

If you're performing server side rendering with Gatsby, then this wouldn't work (SSR isn't supported yet)

If not, make sure you're on the latest React version

Collapse
thidasapankaja profile image
Thidasa Pankaja Paranavitharana

I don't have SSR. Yes. I do have the react latest.
Can't seems to be working. anyway Thanks for the clear introduction :)