This is a quick post to show how to setup environment for react development. The main content is about using React in Visual Studio Code.
1. Install Node.js and yarn
- Install Node.js. When installing nodejs, it installs the included npm.
npm install --global yarn
2. Install the Git CLI & VS Code
3. Using React in Visual Studio Code
3.1. Recommended Extensions
- Debugger for Chrome
- Prettier - Code formatter
- Auto Import
- Auto Close Tag
- Auto Rename Tag
- Import Cost
- TODO Highlight
3.2. Setting auto format code on save
and edit as below
- JSON blob: JSON Blob was created to help parallelize client/server development. Mock JSON responses can be defined using the online editor and then clients can use the JSON Blob API to retrieve and update the mock responses.
- Chrome Inspect Devices: Remote debug Android devices.
You can install Inspect Devices extension to open it faster.