Open kuatro opened 7 years ago
Yean. When you load the specify page. The redux tree will show correct.
@bodyno sorry?
Aha?
Below you can see, that server sends only initial state:
<script data-react-helmet="true" type="text/javascript">
___INITIAL_STATE__ = {
"router": {
"locationBeforeTransitions": {
"pathname": "/async",
"search": "",
"hash": "",
"state": null,
"action": "POP",
"key": "5w0791",
"query": {},
"$searchBase": {
"search": "",
"searchBase": ""
}
}
},
"counter": 0,
"async": {}
}
</script>
@bodyno, @kuatro That is correct, i solved this issue in a server package of myself, a example repo on how to use that package is here
This project comes with react-esc
, a package i created and actively use myself.
react-esc is a server and client package, so you don't need to create a client or server for your project.
As I guess, after server-side rendering the client must fill a state from
window.___INITIAL_STATE__
. But for some reason Redux devTools showsasync
piece of state as empty. As I understood that means the text on page is only rendered HTML, and state is actually empty?