-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPr_1.txt
42 lines (22 loc) · 796 Bytes
/
Pr_1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
To start react you should have node
check version
>node -v
The version should be newer than v 16 .
Use VS code and Prettier extension to format your code automatically when you write them.
On the setting of VSCode, make formatting to be "format on save" automatically.
Two ways to create react Project.
- create react app
- vite
Create react Project using Vite.
> npm create vite@latest
cd ReactProject_1
npm install
npm run dev
Typescript has two extensions, either .ts or .tsx
we use '.ts' for plain typescript files
we use '.tsx' for react components
Add Bootstrap to the Project
>npm install [email protected]
Then delete the App.css content and delete the index.css file.
After that add the line below to the main.tsx
import "bootstrap/dist/css/bootstrap.css";