React组件
时间:2014-10-13 19:23:38
收藏:0
阅读:182
React组件
组件是React中的基本单位,在每个组件里面又封装了程序逻辑,通过reader标出界面片段或者回传一段描述,组件再通过React.renderComponent将组件展示在浏览器中。每个组件的编写中会绑定一些事件,这些事件是动态绑定的,这个以后分析。
看下代码:
/** * Created by 蒯灵敏 on 14-10-13. */ /** @jsx React.DOM */ React.renderComponent( <h1>Hello, world!</h1>, document.getElementById(‘example‘) );
原文:http://www.cnblogs.com/kuailingmin/p/4022828.html
评论(0)