To add a new component to your React Vite project follow these simple steps:
1. Create a directory components in the src directory$ mkdir src/components
2. Create a navigation file in the components directory$ touch src/components/navigation.jsx
3. Open navigation.jsx$ code src/components/navigation.jsx
4. Add the following code to navigation.jsx
5. Import navigation.jsx to App.jsx
6. Start the server$ npm run dev
OUPUT:
> [email protected] dev
> vite
VITE v4.0.3 ready in 627 ms
➜ Local: http://127.0.0.1:5173/
➜ Network: use --host to expose
➜ press h to show help