Learn React
0/2
Lesson 1 of 2

React Foundations

Your First Component

A React component is a function returning JSX (HTML-like syntax). ReactDOM.createRoot(...).render(<App />) mounts it. Run to see it live.

Your Task

Make the App component return an <h1> that says Hello, React!

return <h1>Hello, React!</h1>;
App.jsx
Output
Press "Run Code" to execute your program.
🚀

Ready to run your code?

Create a free account to run code, get instant feedback, and save your progress. No credit card, free forever.

Create Free Account

Already have one? Log in