問題タブ [mapstatetoprops]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
51 参照

reactjs - Redux mapStateToProps が 4 つのコンポーネントのうちの 1 つで機能しない

私は React Redux Saga を使用しておりmapStateToProps、Sage が にディスパッチされたときに OKを受け取る 3 つのコンポーネントがありますreducer。コンポーネントにブレークポイント console.log を配置しても、 4 番目は起動Componentしません。render()render()

上記にデータがあることがわかりStore remoteArticlesます。

何が起こっているかを示す 40 秒の動画を作成しました。

  • デバッグを開始
  • 空の記事で mapStateToProps が壊れる
  • 佐賀発送時の減速機折れ
  • データを保持する記事で mapStateToProps が再び壊れる
  • 次にrender()呼び出す必要がありますが、そうではありません..

https://drive.google.com/file/d/1_QuKQd0YGbMuxrQ-qeQbF5mwlWLk0lly/view

Component起動しない SliderWrapper.jsの完全なコードrender()

Component`SliderWrapper を使用する Timeline.jsの完全なコード