Install Node.js | Create React App | Importing Libraries | Useful IDE Extensions
How to get a React app started for development.
- Open your command prompt or terminal window
- Run
node -v
- If you don't have Node.js installed on your computer, download the latest version here.
using Vite
- Open your command prompt or terminal window
npm create vite@latest
- Specify project name (is
vite-project
by default) - Select a framework (arrow key down to React)
- Navigate to the project folder you just created (
vite-project
or your custom name) - Run
npm install
- Open the project in VS Code (hint: shortcut
code .
) - Open a terminal in VS Code
- Run
npm run dev
in the IDE terminal - Vist the local host url it gives you to see your React & Vite App running on your local computer.
- Open a terminal and navigate to your react app folder.
npm install boostrap@latest
- src > App.css => [remove] the contents of the entire App.css file
- src > index.css => [delete] the file entirely
- src > main.tsx => [remove] the
./index.css
import - add to main.tsx
import 'bootstrap/dist/css/bootstrap.css'
on VS Code
- helps you format your code
Tip: To in VS Code go to: Preferences > Settings => Search: "format on save" => check the box under "Editor: Format On Save"
This allows Prettier to format the code every time the file is saved.
- allows you to type `rafce` to quickly export a React function template to your file.