我试图用flowtype检查一些代码:
export default function configureStore(initialState: initialStateType) {
/* ... */
if (module && module.hot) {
module.hot.accept('../reducers', () => {
const nextRootReducer = require('../reducers');
store.replaceReducer(nextRootReducer);
});
}
/* ... */
}
我收到此错误消息:
src/store/configureStore.js:14
14: module.hot.accept('../reducers', () => {
^ call of method `accept`. Method cannot be called on
14: module.hot.accept('../reducers', () => {
^^^^^^^^^^ property `hot` of unknown type
我该如何解决这个问题?
谢谢!