中文官网:https://reactjs.org.cn/doc/in...html
npm install -g create-react-app create-react-app my-app cd my-app npm start
yarn init yarn add react react-dom
npm init npm install --save react react-dom
根据这个搭建环境: https://ant.design/docs/react...vue
'react-app-rewired' 不是内部或外部命令,也不是可运行的程序或批处理文件。
vue: Vue + Vue-Router + VueX + Axios + Babel + Webpackreact
react: React + React-Router + Redux + Axios + Babel + Webpackwebpack
线上学习react地址:https://reacttraining.com/rea...
注:若是要每一个路由都是新的页面不包含上个页面,就添加exactios
经过 hash 进行对应。好处是简单易用,不用多余设定。web
适用于服务器端渲染,但须要设定服务器端避免处理错误。注意的是若使用 Webpack 开发用,服务器需加上 --history-api-fallbacknpm
$ webpack-dev-server --inline --content-base . --history-api-fallbackapi