-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstructions.txt
More file actions
41 lines (30 loc) · 1.04 KB
/
Copy pathinstructions.txt
File metadata and controls
41 lines (30 loc) · 1.04 KB
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
40
41
to start the development server :-
1. cd <file-name>
2. npm run dev
To start working with react go to terminal and do:-
1. first write a command like this -
npm create vite@latest
2. write project name and then select a framework(React)
3. select plain javascript as a variant
{} use this in html react code to write javascript code inside html code
To change Port number we can locate vite.config.js file in our folder and copy the below code ::-
// vite.config.js
import { defineConfig } from 'vite';
export default defineConfig({
server: {
port: 3001, // change to your desired port
},
});
default code for vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
if you want to exit from a folder using terminal just use command
cd ..
&& is used for rendering elements if the statement is true , if false then returns null
syntax:-
condition && condtion for true statement
returns null for false