keokilee / react-typescript-boilerplate

Boilerplate project for setting up Typescript and React with Babel and Webpack.
ISC License
114 stars 23 forks source link

Redux devtools #124

Open davidmoshal opened 8 years ago

davidmoshal commented 8 years ago

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

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

Thanks for keeping the dependencies up-to-date

David

davidmoshal commented 8 years ago

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

2) 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.

keokilee commented 8 years ago

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:

davidmoshal commented 8 years ago

fair point!