父子组件之间传递数据
摘要:在父组件的输出中可以引用子组件。 属性是从父组件传递给子组件的。 组件的属性: 指定属性:一般是在< />这种标签中指定属性,这时候属于 获取属性:在组件类中使用this.props获取属性 上例中,我们在父组件中设置 state, 并通过在子组件上使用 props 将其传递到子组件上。而最后的渲染
阅读全文
posted @ 2017-04-04 00:19
posted @ 2017-04-04 00:19
posted @ 2017-04-02 23:38
posted @ 2017-04-02 23:04
posted @ 2017-04-02 22:40
posted @ 2017-04-02 11:47
posted @ 2017-04-02 11:14