react-demos记录了对react组件、state、props学习的一些例子
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 ..
# 执行以下 然后在浏览器访问 http://localhost:3000
npm start
react-demos记录了对react组件、state、props学习的一些例子
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 ..
# 执行以下 然后在浏览器访问 http://localhost:3000
npm start