0

I'd like to integrate Redux DevTools (https://github.com/zalmoxisus/redux-devtools-extension) with ReactOnRails (https://github.com/shakacode/react_on_rails) project.

I'm not sure where I can put

window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()

as I created the store from the action in Rails itself. E.g:

redux_store('myStore', props: store_json_string)

So, where should I put the configuration for Redux in my Rails app?

Thanks in advance

1 Answers1

0

If you've run react_on_rails with --redux flag, you can configure it by adding the desired line inside the /app/javascript/bundles/HelloWorld/store/helloWorldStore.js file in createStore:

  // ...
  createStore(
    helloWorldReducer,
    railsProps,
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
  )
  // ...
mbajur
  • 4,406
  • 5
  • 49
  • 79