-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
Don't allow router location change until next content has arrived in the store #1528
Comments
Some of the stuff we've tried included a condition in the render() of component that avoids rendering any content (or render a placeholder) until the store content matches the router path.
|
@tiberiuichim @robgietema we should talk about this today, if possible. Putting it on the sprint list as a reminder. |
See #1550 |
I've found this sort of problem mentioned in the after.js documentation (which is Jared Palmer's (author of Razzle) - version of next.js (an integrated solution for isomorphic React apps)). In that package the router is enhanced so that it calls static getAsyncProps functions from the components so it "prefetches" the component data. |
Leaving this for future reference: https://github.com/eea/volto-base/blob/a0b13935633f5aa70e273612226c5c8cce4d4756/src/store.js#L60 |
There is a very subtle problem that is perceivable only if a page has it own specially dedicated view React component, with a design that makes it obvious and easily distinguished from other components. For example, in our case, a HomepageView that has a background color or image that's different from the rest of the website.
Now for the problem. There is the following sequence of events:
If this whole cycle is anything more then 40ms, it is perceivable by the user. The volto.kitconcept.com server, which is very fast, returns a ?fullobjects getContent request in 100ms+.
In my view, this is on the same level of perceivable problem as the Flash of Unstyled Content.
The text was updated successfully, but these errors were encountered: