- Exercise 1: Setting Up the Environment
- Install Node.js and yarn on your machine.
- Create a new React project using Vite:
yarn create vite my-react-app --template react
- Start the development server:
cd my-react-app && yarn && yarn dev
- Open your project in a code editor (e.g., VS Code) and explore the project structure.
- Exercise 2: Hello World in React
- Create a new component called
HelloWorld.jsx
.
- Use JSX to render a simple "Hello, World!" message.
- Import and render this component in
App.jsx
.
- Run your application in the browser and confirm it displays "Hello, World!".
- Exercise 3: JSX Practice
- Modify the
HelloWorld
component to:
- Display your name and a short bio.
- Add a simple unordered list of your three favorite programming languages.
- Use JSX expressions to render variables inside the component.