react-typescript-boilerplate icon indicating copy to clipboard operation
react-typescript-boilerplate copied to clipboard

Redux devtools

Open davidmoshal opened this issue 9 years ago • 3 comments

This could well be the best React developer experience out there:

  • static typing
  • hot reloading using the latest React Transform

One thing that would be awesome would be to include the Redux Devtools:

  • https://github.com/zalmoxisus/redux-devtools-extension#implementation
  • https://github.com/gaearon/redux-devtools/blob/master/docs/Walkthrough.md

Thanks for keeping the dependencies up-to-date

David

davidmoshal avatar Jan 31 '16 06:01 davidmoshal

Actually, I got this working, with only a couple of line changes, and nothing else installed!

  1. changed createStore in index.tsx
declare var window:any;

function configureStore():Store {
  const store:Store = createStore(
    counterApp,
    {counters: []},
    window.devToolsExtension ? window.devToolsExtension() : undefined
  );

 // the rest of the function is unchanged

  1. changed the createStore definition in redux.d.ts
    function createStore(reducer: Reducer, initialState?: any, opts?:any): Store;

Apparently the optional 3rd parameter is new in redux 3.1 onwards.

davidmoshal avatar Jan 31 '16 06:01 davidmoshal

Thanks for the kind words! Having this wrapped up in a PR maybe would be nice.

Personally, I think the one thing that's missing is testing. After that, then it'd be one step closer to ~~world domination~~ the best React dev experience out there :smile:

keokilee avatar Jan 31 '16 22:01 keokilee

fair point!

davidmoshal avatar Feb 01 '16 01:02 davidmoshal