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

Coding Alan 6年前 (2018-08-19) 9372次浏览 0个评论 扫描二维码

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

基础知识

React 特点

  • Declarative 声明式编码
  • Component-Based 组件化编码
  • 高效-高效的 DOM Diff算法,最小化页面重绘
  • 单向数据流

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

 

喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址