How do you set a dynamic initial state in the ReactReduxSpa template? #1480

Closed
opened 2025-08-09 17:20:18 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @chris-herring on 7/23/2016

In boot-server.tsx a call is made to const store = configureStore();. We can set the initial state by passing the initial state to configureStore however how can we pass a state that is generated dynamically in the c# code e.g. in the HomeController or the Index.cshtml view? Is the asp-prerender-data parameter meant to be used for this?

*Originally created by @chris-herring on 7/23/2016* In boot-server.tsx a call is made to `const store = configureStore();`. We can set the initial state by passing the initial state to configureStore however how can we pass a state that is generated dynamically in the c# code e.g. in the HomeController or the Index.cshtml view? Is the `asp-prerender-data` parameter meant to be used for this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1480
No description provided.