poetries.github.io
poetries.github.io copied to clipboard
React之组件通信方式 | Poetry's Blog
http://blog.poetries.top/2018/07/29/react-comp-communicate/
组件之进行通信的几种情况 父组件向子组件通信 子组件向父组件通信 跨级组件通信 没有嵌套关系组件之间的通信 一、父组件向子组件通信 React数据流动是单向的,父组件向子组件通信也是最常见的;父组件通过props向子组件传递需要的信息 1234567891011121314151617181920212223242526272829// Child.jsximport React fr