1、直接引入.js 文件适用React 会导致js 文件过大过多
2、通过脚手架工具来编码,webpack,grunt,gulp等
3、用官方自带的 create-react-app
https://facebook.github.io/create-react-app/docs/getting-started
yarn create-react-app my-appcd my-app
npm start

npm install -g create-react-app
create-react-app my-app
网友评论