JS Performance of Dynamic Import with SSR #13043
Unanswered
ReinoutStevens
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have extracted some heavier components into separate chunks using dynamic imports ( for example, a quick search component ).
We still render these on the server to prevent content from shifting around.
Using tools such as webpage test we notice that JS execution appears to be waiting on these components before rendering them when getting that page from the server. When putting SSR false this no longer is the case.
Is this the expected behavior, as I would have assumed NextJS would wait with hydrating that specific part of the application until the chunk is available, but still execute the rest of the application.
If this is the expected behavior, how would you improve the startup time of an app with some heavy components, as dynamically loading them does not help when the user lands on a page with such a component.
Beta Was this translation helpful? Give feedback.
All reactions