Error with Redux DevTools Extension using TS: “Property '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__' does not exist on type 'Window'.”?

前端 未结 7 1784
一个人的身影
一个人的身影 2021-02-01 12:43

I\'m getting this error on my index.tsx.

Property \'REDUX_DEVTOOLS_EXTENSION_COMPOSE\' does not exist on type \'Window\'.

Here is my index.tsx

7条回答
  •  无人及你
    2021-02-01 13:18

    Had same issue changed I just changed

    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
    

    to

    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__() || compose
    

    to get past an undefined apply issue when using createStore(reducer, initial state, compose(applyMiddleware

提交回复
热议问题