react--入坑
2021-10-23 本文已影响0人
w_dll
今天目标就是先创建项目,先写一个简单的helloworld!
学习的慕课 https://www.imooc.com/video/17881
第一步 搭环境
先安装 react脚手架
npm install create-react-app -g

新建项目
npm install create-react-app -g

第二步 运行
进入项目目录
npm start



3000端口已经运行
第三步 编写helloworld
写welcome组件
import React from 'react'
class Welcome extends React.Component {
render() {
return <h1>hello world!</h1>
}
}
export default Welcome
修改index.js

查看 修改成功
