Accepted answer

How to view redux store on any website, with no code changes

Update Nov 2019

The react devtools have changed since my original answer. The new components tab in chrome's devtools still has the data, but you may have to search a little bit more.

  1. open chrome devTools
  2. select react devtool's Components tab
  3. click on the top-most node and look in right-hand column for store to be shown
  4. repeat step 3 down the tree until you find the store (for me it was the 4th level)
  5. Now you can follow the steps below with $

Example screenshot

Original Answer

If you have react developer tools running you can use $; with no changes to your codebase.

Note: You have to open the react devtool in your developer tools window first to make this work, otherwise you will get a $r is not defined error

  1. open developer tools
  2. click the React tab
  3. ensure the provider node (or topmost node) is selected
  4. then type $; or ${type:"MY_ACTION"}) into your console


First of all, you need to define the store in the window object (You can place it in you configureStore file): = store;

Then you only need to write in the console the following:;

Hop this helps.


With react developer tools:

const store = [...__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent.internalInstancesById.values()].find(e=>"Provider")


In case you would like to see store state for debugging you could do this:

#import global from 'window-or-global'
const store = createStore(reducer)
const onStateChange = (function (global) {
  global._state = this.getState()
}.bind(store, global))
onStateChange()'Application state is available via global _state object.', '_state=', global._state)


Another answer suggests adding the store to the window, but if you just want access to the store as an object, you can define a getter on the window.

This code needs to be added where you've configured your store - in my app, this is the same file as where <Provider store={store} /> is called.

Now you can type reduxStore in the console to get an object - and copy(reduxStore) to copy it to the clipboard.

  Object.defineProperty(window, 'reduxStore', {
    get() {
      return store.getState();

You can wrap this in an if (process.env.NODE_ENV === 'development') to disable it in production.


If you're using Next JS, you can access the store by: window.__NEXT_REDUX_STORE__.getState()

You can also dispatch actions, just look at the options you have in window.__NEXT_REDUX_STORE__


You can use a logging middleware as described in the Redux Book:

 * Logs all actions and states after they are dispatched.
const logger = store => next => action => {'dispatching', action)
  let result = next(action)
  console.log('next state', store.getState())
  return result

let createStoreWithMiddleware = applyMiddleware(logger)(createStore)

let yourApp = combineReducers(reducers)
let store = createStoreWithMiddleware(yourApp)

Alternatively, you could change the logging to just append to a global array (your window._redux) and you could look in the array when you needed information on a particular state.


The recommended solution doesn't work for me.

The correct command is:



let store = createStore(yourApp); = store;

Now you can access the store from in the console like this:{type:"MY_ACTION"})

Related Query

More Query from same tag