2016-03-25 7 views
2

My ReactはInternet Explorer 10にロードされません(ChromeとFFで正しく動作します)。Internet Explorerでreact-redux trySubscribeでエラー(未定義のプロパティ「購読」を取得できません)

私は取得していますエラー:

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機能が反応し、Reduxのをである(SRC /コンポーネント/ connect.js):だから

trySubscribe() { 
     if (shouldSubscribe && !this.unsubscribe) { 
      this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)) 
      this.handleChange() 
     } 
     } 

this.storeは定義されていないようですが、なぜわかりませんか?

答えて

2

見つけた!

私は別のコンテナコンポーネントを拡張するコンテナコンポーネントを使用していましたが、どちらも@connectで装飾されています。

私は@connectのコンポーネントツリーに含まれていないコンポーネントを試していました。

スーパークラスから@connectを削除した後、問題は解決しました! (実際はスーパークラスを完全に削除しました(これ以上は使用しません)、直接拡張しますComponent)。

関連する問題