摘要: npm install -g create-react-app create-react-app myapp /* 使用命令创建应用,myapp为项目名称 */ npm start /*启动项目*/ npm install react-redux --save 阅读全文
posted @ 2018-07-09 11:25 雾雨云露 阅读(68) 评论(0) 推荐(0) 编辑
摘要: addKeyFrames('-' + heightOrWidth + 'px',direction) // 设置keyframes addKeyFrames(num,direction) { let style = document.createElement('style'); let {spee 阅读全文
posted @ 2018-07-02 10:42 雾雨云露 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Ract生命周期 React 生命周期分为三种状态 1. 初始化 2.更新 3.销毁 初始化 1、getDefaultProps() 设置默认的props,也可以用dufaultProps设置组件的默认属性. 2、getInitialState() 在使用es6的class语法时是没有这个钩子函数的 阅读全文
posted @ 2018-06-27 10:11 雾雨云露 阅读(103) 评论(0) 推荐(0) 编辑