-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
how to avoid the dup request for ssr #813
Comments
Typically, server responses with html are cached for a longer time than api because the server-side react rendering is slow, so that the visitor sees a page instantly and when the javascript is ready the data will be actualized. However, you can share the server data to the client to reduce network usage (it seems it is already implemented in the feature/redux branch, see Readme/Customization). But the idea is very simple, all you have to do is:
See also: A bare minimum Redux integration |
Please use data attribute for serializing JSON into document. <script id="source" data-initial-state={JSON.stringify(store.getState())}></script> |
@frenzzy yeah, that we have done. |
fetch data in the home async router
what I found:
The text was updated successfully, but these errors were encountered: