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

LazyBoundry fallback doest not work with react-router-dom #204

Open
KoderFPV opened this issue Nov 18, 2020 · 1 comment
Open

LazyBoundry fallback doest not work with react-router-dom #204

KoderFPV opened this issue Nov 18, 2020 · 1 comment

Comments

@KoderFPV
Copy link

KoderFPV commented Nov 18, 2020

Hi,
I have a problem with LazyBoundry component and its fallback property.

Here is example code:

image

I am switching the page and LazyBoundry fallback does not display anything.
Should I use it in some other way?
On client we are using BrowserRouter on SSR StaticRouter

I as far I remember it was working that way with the standard Suspense component when I didn't have SSR implemented.

Thanks

@theKashey
Copy link
Owner

Right now LazyBondary is Suspense -

const Boundary = isBackend ? LazyBoundary : React.Suspense;

However, there is a yet unresolved issue - #202 - which is needed to support SSR+React > 16.9. The issue is around React "knows" that you can not use Suspense on the server, and breaks if you hydrate, because 🤔 you cannot use Suspense so we will not let you do it.

Look like for how the simplest way to mitigate the issue with Suspense is to use React < 16.10. For example, everything confirmed to work perfectly with 16.9.

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

2 participants