react-learn

react-demos记录了对react组件、state、props学习的一些例子

my-app本地环境搭建

1.安装node.js

https://nodejs.org/en/

2.

npx create-react-app my-app
cd my-app
cd src

# 如果你使用 Mac 或 Linux:
rm -f *

# 如果你使用 Windows:
del *

# 然后回到项目文件夹 将本项目index.js index.css拷贝至my-app/src中
cd ..

3.

# 执行以下 然后在浏览器访问 http://localhost:3000
npm start