07 2020 档案

摘要:react-router包含三个库:react-router、react-router-dom、react-router-native;react-router提供基本的路由功能,实际使用时不需要直接安装,根据运行环境选择react-router-dom(浏览器中)或react-router-nat 阅读全文
posted @ 2020-07-30 21:30 安静的嘶吼 阅读(200) 评论(0) 推荐(0) 编辑
摘要:react-redux: // index.js import React from "react"; import ReactDOM from "react-dom"; import "./index.css"; import App from "./App"; import { Provider 阅读全文
posted @ 2020-07-29 15:07 安静的嘶吼 阅读(211) 评论(0) 推荐(0) 编辑
摘要:Redux:JavaScript状态管理容易,保证行为一致性及易于测试可追踪。 Redux流程: 1. createStore 创建 store; 2. reducer 初始化、修改状态函数;reducer 是一个纯函数,接收旧的 state 和 action,返回新的 state; 3. getS 阅读全文
posted @ 2020-07-29 15:05 安静的嘶吼 阅读(163) 评论(0) 推荐(0) 编辑
摘要:创建项目: npx create-react-app demo cd demo npm start 引入antd: yarn add antd import React from "react"; import Button from "antd/es/button"; import "antd/d 阅读全文
posted @ 2020-07-26 15:16 安静的嘶吼 阅读(692) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示