太上老俊

2016年11月30日

React之Composition Vs inheritance 组合Vs继承

摘要: React的组合 composition: props有个特殊属性,children,组件可以通过props.children拿到所有包含在内的子元素, 当组件内有子元素时,组件属性上的children属性不生效,当组件无子元素时,属性中的children生效 上面代码也可以将FancyBorder 阅读全文

posted @ 2016-11-30 18:27 太上老俊 阅读(406) 评论(0) 推荐(0) 编辑

React之Froms

摘要: In React, a <textarea> uses a value attribute instead. This way, a form using a <textarea>can be written very similarly to a form that uses a single-l 阅读全文

posted @ 2016-11-30 15:03 太上老俊 阅读(174) 评论(0) 推荐(0) 编辑

导航