download node.js and install
check whether it is properly installed by
node -v
C:\Users\rmcme>node -v
v18.15.0
C:\Users\rmcme>npm create vite
y to proceed
select vite version 4.1
give project name : react-app
select framework: React
select variant : typescript
C:\Users\rmcme>cd react-app
install vs code
cd react-app
npm i ----to install
C:\Users\rmcme\react-app\code . to open vs code editor
In VS code Terminal, enter
npm run dev
you will see similar to this URL: http://localhost:5173/
click the URL to see the webpage to check
Now create a file Meesage.tsx in src folder
add
/Pascal Casing
Edit App.tsx file
replace with the following
You can check in the browser
In terminal window in VS code,
install Bootstrap
npm i bootstrap@5.2.3
edit App.css
delete the contents and save
edit index.css
delete the contents and save
edit main.tsx
replace
with
import 'bootstrap/dist/css/bootstrap.css'
Create a directory components under src
under components create a file ListGroup.tsx
add the following contents:
Edit App.tsx
replace the contents with
Replace the contents.
Check in the Browser and inspect to check the clicked events
No comments:
Post a Comment