Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] NextJS | Lazyloading Components #71

Open
giri-jeedigunta opened this issue Aug 6, 2021 · 1 comment
Open

[bug] NextJS | Lazyloading Components #71

giri-jeedigunta opened this issue Aug 6, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@giri-jeedigunta
Copy link

Describe the bug
I have Header, Video, Footer coming as part of this.childComponents... Is there a way to lazy load my footer component or have more control on the list of components without breaking in-context editing?

Package version
^1.1.6

To Reproduce
N/A

Expected behavior

  • Would be great if there are some useful examples / documentation around these packages.

Screenshots
N/A

Additional context
N/A

@giri-jeedigunta giri-jeedigunta added the bug Something isn't working label Aug 6, 2021
@niekraaijmakers
Copy link
Contributor

niekraaijmakers commented Aug 28, 2021

With NextJS I don't believe we have an example like this currently.
We got lazyloading examples currently with react universal component on vanilla react, in our archetype.

This is how I would try to approach it:

Try to leverage custom webpack config to integrate the react universal component somehow in combination with react universal component.

Now, this is a third party plugin, which is not as great as using something OOTB. Once React 18 is released (not in alpha) then we can move into using React.Lazy() which will be better and might actually solve this, provided we can use React.Lazy with NextJS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants