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

前端 未结 7 1778
一个人的身影
一个人的身影 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:30

    My approach to the issue was the following:

    export const composeEnhancers =
      (window && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose;
    
    0 讨论(0)
提交回复
热议问题