score:0

Accepted answer

if you just need data, you could send it along with the html file.

index.html:

<script>
var initialstate = /* have the server render some json here */
</script>

and then use "initialstate" to populate the first screen. if you are using redux you could use that variable as the initial state of your store. but as mentioned in the comments, redux is not necessary for this; arguably it makes it easier to do so.


for true server-side rendering you would actually send a full html page containing all html and data already to match exactly what your spa would generate.


Related Query

More Query from same tag