我的 React 无法在 Internet Explorer 10 上加载(与 Chrome 和 FF 一起正常工作)。
我收到错误:
TypeError: Cannot get property "subscribe" of undefined
at trySubscribe
at componentDidMount
at notifyAll
at close
at closeAll
at perform
at perform
at perform
at m
at close
(翻译)
trySubscribe 函数在 react-redux ( src/components/connect.js ) 中:
trySubscribe() {
if (shouldSubscribe && !this.unsubscribe) {
this.unsubscribe = this.store.subscribe(this.handleChange.bind(this))
this.handleChange()
}
}
所以似乎 this.store 是未定义的,但我不知道为什么?