Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting entire redux state as a separate JSON file

I need to get the whole Redux state as a JSON file without payload or action from Redux DevTools, just the state.

like image 853
Pushkin Avatar asked Dec 03 '18 08:12

Pushkin


People also ask

How can I retrieve data from JSON file in Redux?

Setting Up a Local JSON file In a blank Create React App project, create a local JSON file named data. json inside the public directory. Your Fetch API calls made from a React component always look for files or any other relevant assets inside this public directory.

How do you get Redux State on console?

current; // Traverse the root react element to find all Redux States in the app traverse(internalRoot); After running this script, all Redux States will be available inside the variable stores , and you can access them via [... stores].

Can a user change Redux state?

One of the main principles of the Redux store is, that it can only be changed by reducer functions, whenever an action is dispatched.


1 Answers

State -> Raw -> Copy & Paste

Snapshot

like image 67
lecstor Avatar answered Sep 28 '22 06:09

lecstor