美文网首页
React Toolchains

React Toolchains

作者: 普笛 | 来源:发表于2019-02-08 09:18 被阅读0次

All React components must act like pure functions with respect to their props.

1.Create React App

react,react-dom,react-script,babel,webpack。支持HMR。

主页为:src/index.js
npx create-react-app my-app
cd my-app
npm start

2.Next.js

Next.js 是一个轻量级的 React 服务端渲染应用框架。react,react-dom,next,babel,webpack。支持HMR。

主页为:pages/index.js

https://nextjs.org/docs

npm install --save next react react-dom

在package.json中添加

  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  }

在pages文件中添加index.js

export default () => <div>Welcome to next.js!</div>

3.Gatsby

Gatsby is the best way to create static websites with React.

npx gatsby new gatsby-site
cd gatsby-site
npm run develop

4.Redux

https://redux.js.org/

5.dva.js

https://dvajs.com/
https://www.jianshu.com/p/e184cd6d253c (dva核心概念)

$ npm install dva-cli -g
$ dva new dva-quickstart
$ cd dva-quickstart
$ npm start

6.Umi

https://umijs.org/

7.AntPro

https://pro.ant.design/index-cn

相关文章

网友评论

      本文标题:React Toolchains

      本文链接:https://www.haomeiwen.com/subject/kwpnsqtx.html