Redux-devtools-extension: Npm package broken with Redux 4 and TypeScript

Created on 8 Mar 2018  路  8Comments  路  Source: zalmoxisus/redux-devtools-extension

Hello

Now that the extension is compatible with Redux 4 I decided to try it in our project. The project uses TypeScript.

I'm using the npm package to add the middleware to our store, but I get an error about GenericStoreEnhancer.
This appears to be an issue with the type definition file.

According to a comment in #460, GenericStoreEnhancer is removed in Redux 4.
It appears to have been removed from Redux in this commit reactjs/redux@cbdca6215e1891e97120ac05c971618182455e54

Most helpful comment

@Cryrivers It was released :)

All 8 comments

Current master is still targeted to redux 3.7.2. I would create a PR when redux 4 is released.

@Cryrivers It was released :)

can you fix the problem?

@saostad

There is a workaround for it Here and Here

The fix was not published to NPM?

Any news on this?

The npm package is now supported Redux v4 with TypeScript. :)

I can't get redux devTools working with Redux v4. When I call:
store = createStore( reducers, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() );

I get an error in the console:
VM105:2 Uncaught TypeError: Cannot read property 'state' of undefined
at unliftState (:2:31677)
at Object.getState (:2:31745)
at Function.getStoreState (AppStore.ts?a477:71)
at Function.start (Renderer.ts?7ee2:68)
at eval (index.ts?7fbc:5)
at Object../src/renderer/index.ts (renderer.js:2589)
at __webpack_require__ (renderer.js:680)
at fn (renderer.js:90)
at Object.0 (renderer.js:2605)
at __webpack_require__ (renderer.js:680)

If I just do:
store = createStore( reducers );
then my app starts up fine.

Was this page helpful?
0 / 5 - 0 ratings