3
如何解决 React 中组件传递方法链路很长的问题?
source link: https://www.v2ex.com/t/789488
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
如何解决 React 中组件传递方法链路很长的问题?
一个组件 A 的方法通过 props 传递到组件 B 然后到组件 C 再到 D 再到 E...
这样的写法找起来真是痛苦啊,所以如何解决这种问题呢?
网上搜了一圈没找到方案,所以来问下哈哈哈
12 条回复 • 2021-07-14 16:51:47 +08:00
KuroNekoFan 22 分钟前
context 挺好的
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK