随笔分类 -  reactJS

摘要:React学习网站 React官方英文网站:http://reactjs.cn/react/docs/top-level-api.html React官方中文网站:http://www.css88.com/react/docs/getting-started.html 阮一峰关于React的网站:h 阅读全文
posted @ 2016-12-22 14:10 尹丹 阅读(604) 评论(0) 推荐(0)
摘要:setState 参数:nextState(object),[callback(function)] 设置nextState的某个键值。通常如果希望在某个事件或某个回调中来重新渲染组件,setState是一个最常用的触发方法,因为我们把UI内容跟state状态直接绑定在一起,一旦state发生改变并 阅读全文
posted @ 2016-12-22 13:30 尹丹 阅读(433) 评论(0) 推荐(0)
摘要:Mounting/组件挂载相关: componentWillMount componentDidMount Updating/组件更新相关: componentWillReceiveProps shouldComponentUpdate componentWillUpdate componentDi 阅读全文
posted @ 2016-12-19 17:56 尹丹 阅读(1664) 评论(0) 推荐(0)
摘要:React.createClass 参数:config(object) 创建一个ReactClass(组件类),参数是一个对象且必须带有render属性方法,该方法必须返回一个封闭的容器(容器内可以由其他不限结构的容器)或null/false(表示啥都不渲染): 注意:在该方法里面,所有的this都 阅读全文
posted @ 2016-12-19 10:36 尹丹 阅读(579) 评论(0) 推荐(0)