Cai dat moi truong react

Cài đặt react router: npm install react-router-dom

Trang chủ:https://redux.js.org/introduction/installation
$npm install redux
$npm install react-redux
$npm install --save-dev redux-devtools

Installing ReactJS using webpack and babel

https://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htm

Cách nhanh nhất: npm init react-app my-app Link: https://facebook.github.io/create-react-app/docs/getting-started

Cách tạo react nhanh nhất tạo global rồi sử dụng lệnh create-react-app my-app

    1. npm install -g create-react-app
    1. create-react-app my-app
      or npx create-react-app my-app
    1. cd my-app
    1. npm start

Đã cài đặt thành công theo 6 bước sau:

create-react-app my-app 1. npm init

2. npm i react

npm install react react-dom react-scripts --save

4. npm i react-dom

5. npm i react-scripts

6. npm start (Dùng để chạy chương trình)

Sửa lỗi: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers

echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
Sua loi: https://github.com/olefredrik/FoundationPress/issues/1011
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288

Last updated

Was this helpful?