Reputation: 1989
How can I hydrate my redux store with a JSON file (that was previously export from Redux dev tools) for development purposes (to avoid call to database) ?
Upvotes: 1
Views: 499
Reputation: 40448
What is the purpose of this? Anyway:
let store = createStore(todoApp, window.STATE_FROM_SERVER)
)window.STATE_FROM_SERVER
in the console with the JSON that you exported before.Obviously the checksums are going to mismatch if you are using server-side rendering.
Upvotes: 1