V
V
vispik882016-10-06 11:32:36
JavaScript
vispik88, 2016-10-06 11:32:36

How can I switch the page using React Router after receiving data?

Interested in this question:
The project uses react-router. When a route is switched, a request is sent to the socket for information. But the page without information is already being rendered. As soon as the data is received, the page takes the desired form.
A question of such a plan: maybe there are some libraries / components on top of the router to skip rendering an empty page? How can this problem be solved?
Thank you for your attention

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2016-10-06
@maxfarseer

You can solve the preloader. While there is no data - draw a preloader (the line "loading ...", watch, or something else).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question