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

Combining with <link rel="prefetch" /> results in loading async components twice #77

Open
doque opened this issue Mar 16, 2018 · 0 comments

Comments

@doque
Copy link

doque commented Mar 16, 2018

Hello,

first off thanks for this framework, I love the simplicity and especially the thorough documentation how to add this. We're using it together with react-universally and it's awesome.

But I'm having a small issue while trying to optimize requests to the server. I've got all my bundles set up, the lazy loading works fine: amain bundle that contains a login screen and a "main" view, then I've got a config bundle which is lazy-loaded when navigating to the settings page).

Then, funny things happen. The prefetch seemingly is done, but Chrome (Canary Build) ignores the response (I was able to reproduce this with FF also, where the response was fine, so I'm blaming Chrome for this):

image

Then, navigating to the settings page results in the supposedly prefetched bundle to be loaded again and, while being loaded, I'm presented with a flash of white nothing (which I'm assuming is due to the loadingComponent of null being rendered in the meantime).

Any ideas how to tackle this?

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant