07 2020 档案

摘要:1 安装:cnpm i react-router-dom 2 3 4 5 <Route path='/' exact render={()=><div>home</div>}></Route> 6 7 当路径为/根路径时候显示里面的内容home,exact 表示完全配置这个路径, 8 9 例如为ht 阅读全文
posted @ 2020-07-18 22:13 雪糕战士 阅读(882) 评论(0) 推荐(0)
摘要:文档目录 immutable使用 1、安装:cnpm i immutable 在reducer中引用 import { fromJS } from 'immutable'; const defaultState = fromJS ({ focused : false }); immutable对象s 阅读全文
posted @ 2020-07-16 22:17 雪糕战士 阅读(527) 评论(0) 推荐(0)
摘要:outline:none; 阅读全文
posted @ 2020-07-12 23:00 雪糕战士 阅读(1793) 评论(0) 推荐(0)
摘要:styled-components用法 定义样式 import styled from 'styled-components'; export const HeaderWrapper = styled.div` height:56px; background:red; ` 组件里面使用 import 阅读全文
posted @ 2020-07-12 16:58 雪糕战士 阅读(334) 评论(0) 推荐(0)
摘要:1、项目初始化配置 styled-components让css项目互相不干扰 cnpm i styled-components 使用方法 import { createGlobalStyle } from 'styled-components'; export const Globalstyle = 阅读全文
posted @ 2020-07-12 15:10 雪糕战士 阅读(156) 评论(0) 推荐(0)
摘要:安装react-redux cnpm i react-redux 文件目录 定义store文件 1 index.js文件: 2 3 import { createStore } from 'redux'; 4 import reducer from './reducer'; 5 const stor 阅读全文
posted @ 2020-07-12 00:11 雪糕战士 阅读(124) 评论(0) 推荐(0)
摘要:我试了很多办法,重装node升级npm,都失败了,git上发现 create-react-app myproject --use-npm能够暂时解决,但是我安装ant desig时候package.json中缺少依赖项提示有出来了,而且安装失败,后面我卸载了C:\Users\Administrato 阅读全文
posted @ 2020-07-05 19:15 雪糕战士 阅读(577) 评论(0) 推荐(0)
摘要:redux安装 npm add redux Ant Design 安装 npm add antd 引入css import 'antd/dist/antd.css'; 组件使用 import { Input, Button,List, Typography, Divider } from 'antd 阅读全文
posted @ 2020-07-02 21:32 雪糕战士 阅读(262) 评论(0) 推荐(0)
摘要:安裝:cnpm i react-transition-group 详细介绍: https://reactcommunity.org/react-transition-group/css-transition /* 显示 */ /* fade-appear第一次显示执行的样式 */ .fade-ent 阅读全文
posted @ 2020-07-01 22:44 雪糕战士 阅读(621) 评论(0) 推荐(0)