Hey guys,
I'm building an app which needs to have good SEO, so I load all my data in fetchData calls. The problem is that it makes the client experience very slow. When I navigate to a route that needs to load new data (from an API), there is a waiting time of between 0.3s and 1s before the new page gets displayed at all. That's a time where nothing happens to show the user that his action triggered something. It feels like nothing happens.
What I'm trying to do instead is to render the next component immediatly with a spinner while it takes time to load data. Basically the same behaviour as fetchDataDeferred but only when I'm the client experience.
Does anybody have an idea on how to do this?
What about setting something like window.__CLIENT__ = true; in client.js and then in your container have:
@asyncConnect([{
deferred: !!__CLIENT__,
...
}])
I'm not sure that will work as-is but you get the idea, right?
Most helpful comment
What about setting something like
window.__CLIENT__ = true;inclient.jsand then in your container have:I'm not sure that will work as-is but you get the idea, right?