Open davidfurlong opened 8 years ago
It's being set in the HTML.js. No libraries or magic tricks, just a straightforward serialization of the redux store. Here is the line in HTML.js:
<script dangerouslySetInnerHTML={{__html:
window.__data=${serialize(store.getState())};`}} charSet="UTF-8"/>
`
I'm not sure I understand the second question so if you can elaborate more I will try to answer.
I'm looking into storing the redux state in localStorage to be loaded initially, but it seems that the server is already doing this somehow? I'm a little confused as to where the data is setting window.__data and assume its some library call doing it. Thanks!
Additionally we've moved away from sessions and towards a RESTful API but I'm worried about performance in terms of server side rendering / redux model storage and how thats working. I appreciate any advice!