Let's get started with setting up a new React project that uses TypeScript, all powered by Vite.
- Open your terminal and run the following command:
npm create vite@latest
- Name your project:
The installer will prompt you for a project name. I'm calling mine
react-with-ts, but feel free to choose any name you like!

- Choose your framework and variant: You'll then be asked to select a framework and a variant. Make sure to choose React for the framework and TypeScript for the variant.

now follow next steps to install all other dependencies

- Clean up unnecessary files: Once the project is created, it's a good idea to tidy things up. You can safely remove files and folders that we won't be using for a fresh start, such as assets, app.css, index.css, and the entire public folder

- Prepare
App.tsx:
Navigate to the App.tsx file. Delete all the existing code inside it, and then use the rafce

- Verify your setup:
Finally, let's make sure everything is running smoothly. In your terminal, run:

This should start your development server, and you can open your browser to confirm the app is working!
Understanding Component Props in Action
- Create a
components folder:
First, within your src directory, create a new folder called components. This is where we'll house our reusable UI pieces.
- Create your component file:
Inside the newly created
components folder, let's create a file named Chai-Order.tsx. This file will contain our ChaiOrder component.