随笔分类 -  React之路

react知识点
摘要:github仓库地址:https://github.com/wanghao12345/react-book 简介 我们在使用redux中的combineReducers用来分离reducer后,如果组件去访问数据时,需要访问多一层属性,为了将访问这一层属性的方式变成使用函数进行访问。这里就可以使用r 阅读全文
posted @ 2019-07-10 11:15 CodingCoder 阅读(240) 评论(0) 推荐(0)
摘要:github仓库地址:https://github.com/wanghao12345/react-book 简介 immutable可以将store中的数据封装成一个immutable对象,这个对象拥有get,set等方法,这样就可以通过这些方法对store中的数据进行管理 使用 1.安装immut 阅读全文
posted @ 2019-07-10 10:51 CodingCoder 阅读(528) 评论(0) 推荐(0)
摘要:github仓库地址:https://github.com/wanghao12345/react-book 使用constants constants主要是用来管理一些固定的常量,在功能模块下的store新建constants.js文件。内容如下: 使用actionCreators 最开始在使用ma 阅读全文
posted @ 2019-07-09 13:55 CodingCoder 阅读(769) 评论(0) 推荐(0)
摘要:github仓库地址:https://github.com/wanghao12345/react-book 背景 如果一个项目,比较大,需要redux存储的状态数据比较多时,reducer.js无疑是会非常臃肿的。所以为了简化reducer.js文件,我们应该按照功能模块将这个大的reducer.j 阅读全文
posted @ 2019-07-09 11:25 CodingCoder 阅读(1258) 评论(0) 推荐(0)
摘要:github仓库地址:https://github.com/wanghao12345/react-book 简介 redux主要是用来记录数据状态,然后共享数据。每个react组件都可以获取该数据库中的数据,也可以改变该数据库中的数据。 引入redux 项目目录下的控制台输入: yarn add r 阅读全文
posted @ 2019-07-08 17:57 CodingCoder 阅读(263) 评论(0) 推荐(0)
摘要:github仓库地址:https://github.com/wanghao12345/react-book 这里主要讲解使用react-transition-group里面的CSSTransition实现动画。 使用CSSTransition实现动画,一共分三步: 1.引用CSSTransition 阅读全文
posted @ 2019-07-08 16:29 CodingCoder 阅读(3968) 评论(0) 推荐(0)