Javascript 集成';作出反应:';无法将类作为函数调用';
如何修复它Javascript 集成';作出反应:';无法将类作为函数调用';,javascript,reactjs,redux-thunk,Javascript,Reactjs,Redux Thunk,如何修复它 composeWithDevTools(applyMiddleware()) // work composeWithDevTools(applyMiddleware(thunk)) // don't work 控制台错误消息: Uncaught TypeError: Cannot call a class as a function 代码: 反而 import thunk from 'react-thunk'; 一定是 import thunk from 'redux-thun
composeWithDevTools(applyMiddleware()) // work
composeWithDevTools(applyMiddleware(thunk)) // don't work
控制台错误消息:
Uncaught TypeError: Cannot call a class as a function
代码:
反而
import thunk from 'react-thunk';
一定是
import thunk from 'redux-thunk';
天哪,我被困在这上面太久了,不明白为什么。有一个名为react thunk的npm软件包,我一定安装了它,它把我所有的自动完成都搞糟了。我只是一直在看“react thunk”和“redux thunk”。总之,你是救命恩人,先生。非常感谢。
import thunk from 'react-thunk';
import thunk from 'redux-thunk';