界面开发状态管理组件通信本页总览组件通信 大纲 组件通信 父子组件通信 兄弟组件通信 跨多层级组件通信 父子组件通信 父 -> 子 props 子 -> 父 event props 兄弟组件通信 子(兄弟A)-> 父 -> 子(兄弟B) event props props 子(兄弟A)->> Store Redux - dispatch Store ->> 子(兄弟B) Context Redux - connect 跨多层级组件通信 子(A)->> Store Redux - dispatch Store ->> 子(B) Context Redux - connect 参考 https://zh-hans.react.dev/learn/sharing-state-between-components https://zh-hans.react.dev/learn/passing-data-deeply-with-context https://zh-hans.react.dev/learn/scaling-up-with-reducer-and-context