ReactJS 学习资源

Category: /knowledge /front_end
Tags: front_end



sudo apt install npm nodejs

# method 1, go to workspace folder
# create an app folder by youself
mkdir reactApp; cd reactApp

npm init -y
npm install webpack --save
npm install webpack-dev-server --save
npm install react --save

# method 2, go to workspace folder
npm install -g create-react-app
create-react-app $project_name
cd $project_name
npm start
# the app is running at port 3000 by default

Useful commands

  • Start the dev server: npm start

  • Compile to static files for production: npm run build

  • Start the test runner: npm test

  • Remove this tool and copies build dependencies, conf files and scripts into the app dir: npm run eject



  • 如果看不到讨论部分, 请暂时关掉adblock in Firefox/Chrome
  • 本网站使用Javascript实现评论功能, 此处外链对提高您的网站PR没有帮助. (潜台词: 请不要灌水, 谢谢)