Modify state in Redux DevTools Extension

Fellow Stranger picture Fellow Stranger · Dec 18, 2017 · Viewed 25.5k times · Source

In my application state there are values set as initialState.

With the React Developer Tools it's very easy to directly modify some state value.

Is anything similar possible in Redux DevTools Extension, i.e. click and insert a new value for a specific property?

In this SO anwer it's stated that it's possible to "change whatever you want", but I cannot find how.

In the State -> Raw pane (see pic below) one can overwrite values but it doesn't seem to be applied.

enter image description here

Answer

Vnvizitiu picture Vnvizitiu · Aug 29, 2018

You can cause an action to dispatch that updates your object (or you can type it by hand, whichever is easier for you) and then you can cause a new dispatch straight from the tool with the following button

Screenshot of Redux Tools

for example, if you wish to simulate the server returned an object in a different state, just dispatch the action that updated the object again with the modified fields.