Alan Hou的个人博客

React 全家桶+AntD搭建后台管理系统

React 全家桶+AntD搭建后台管理系统

基础知识

React 特点

Vue & React 生态

Vue + Vue-Router + Vuex + Axios + Babel + Webpack
React + React-Router – Redux + Axios + Babel +Webpack

React 脚手架、Yarn

React 生命周期

getDefaultProps
getInitialState
componentWillMount
render
componentDidMount
componentWillReceiveProps
shouldComponentUpdate
componentWillUpdate
componentDidUpdate
componentWillUnmount

AntD 基于LESS,可暴露 WebPack 来进行相应修改

React Router 4.0
react-router(基础包)
react-router-dom(针对浏览器端,已包含 react-router)提供了BrowserRouter, HashRouter, Route(path, exact, component, render), Link, NavLink, switch, redirect
yarn add react-router-dom
获取动态路由参数:this.props.match.params.xxx
React 文件的基本写法:

获取子节点:this.props.children

Mock 数据:https://www.easy-mock.com

常见问题

1、A template was not provided. This is likely because you’re using an outdated version of create-react

 

退出移动版