shawlp / interview-codes

1 stars 0 forks source link

react组件传值方式 #23

Open shawlp opened 3 years ago

shawlp commented 3 years ago
  1. 使用react自带的Context进行通信,createContext创建上下文,useContext使用上下文
  2. 使用Redux或者Mobx等状态管理库
  3. 使用订阅发布模式