There is a website, the front is written by ReactJS. For the correct operation of the CEO, SSR is used. The algorithm is like:
1 page load
- the browser opens / foo;
- SSR checks if is in the cache /foo does not find it;
- SSR renders on the server and executes the react application on request / foo;
- SSR puts in the cache HTML, which turned out as a result of the render process / foo;
- SSR gives to the browser an HTMLL, which was the result of the render process / foo;
- The browser performs asynchronous requests, which are HTML, which is the result of the / foo render (CSS, JS, favicon ...);
- the loaded application react "understands that the page has already been drawn and that it's not necessary to perform routing and so on";
- The react processes the user's further actions (as in a regular SPA).
Subsequent Updates
- the browser opens / foo;
- SSR checks if is in the cache /foo does not find it;
- SSR renders on the server and executes the react application on request / foo;
- SSR puts in the cache HTML, which turned out as a result of the render process / foo;
- gives to the browser an HTMLL, which was the result of the render process / foo;
- The browser performs asynchronous requests, which are HTML, which is the result of the / foo render (CSS, JS, favicon ...);
- the loaded application react "understands that the page has already been drawn and that it's not necessary to perform routing and so on";
The react processes the user's further actions (as in a regular SPA). The problem is at the front that every time the page is refreshed, routing is started and the entire application is drawn anew, and thus “flicker” appears, that is point 7 does not work.
Question: Is it possible to stop this rendering at a certain moment? Tell the route that it’s not necessary to draw it right now. Maybe there is any popular solution?