question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could this help us with lazy load with react.lazy

See original GitHub issue

Just curious to know, could we use react-ssr-prepass to handle React.lazy imports on SSR?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kittencommented, Mar 30, 2020

Indeed there’s some dedicated logic that’ll preload React.lazy components 😃 https://github.com/FormidableLabs/react-ssr-prepass/blob/master/src/render/lazyComponent.js

2reactions
JoviDeCroockcommented, Mar 30, 2020

Yes, this library is meant to provide Suspense support on the server, this means that thrown promises like lazy or a data-library supporting suspense will be supported on the server-side render.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lazy Loading React Components With React.lazy & Suspense
So you should only use React.lazy when you need to load a component asynchronously. The component is not readily needed in the initial...
Read more >
React lazy loading and performance - Retool
The React.lazy() function allows you to render a dynamic import as a normal component. It makes it simple to construct components that are ......
Read more >
javascript - React lazy loading - when to use - Stack Overflow
No, for every component it no needed. It make sense to use for each layout or page. A good place to start is...
Read more >
Lazy loading React components - LogRocket Blog
React.lazy() makes it easy to create components that are loaded using dynamic import() but rendered like ...
Read more >
React Lazy Loading: The Best Complete Guide - CopyCat Blog
The major benefit of lazy loading in React is performance. Loading less JavaScript code to the browser will reduce DOM load time and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found