erikras / erikras/react-redux-universal-hot-example

Use fetchData on server and fetchDataDeferred on client

Open
#1,007 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.