πŸŽ“ A1Learner
πŸ”
0 of 50 lessons completed

React Introduction

React is a JavaScript library for building user interfaces. This course uses React 19.3.1 with Vite 8.3.7.

A first look

This small App shows one heading on the page.

export default function App() {
  return <h1>Hello, React!</h1>
}

The heading on the page

The return line holds the markup for the page.

return <h1>Hello, React!</h1>

Example

export default function App() {
  return <h1>Hello, React!</h1>
}

Key points

  • A user interface is the part of a web page that a person sees and reads.
  • React turns JavaScript code into HTML on the page.
  • A library is a set of ready-made code that a developer can use.
  • React runs in the browser with JavaScript.

In this example, App is a JavaScript function. The function returns a heading. React turns that heading into HTML on the page. The heading reads Hello, React!.

Note

React 19.3.1 is the version used in every example in this course.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

What is React?