Skip to content
BENIBIX Learn

React

Development🌐 Web DevelopmentFrameworks

Also known as React.js, ReactJS

A JavaScript library. You build screens with it out of small parts.

Think of it like

Think of it like a box of building bricks for screens. You snap parts together, and it keeps them up to date.

Example

React was first released by Facebook, now Meta, in 2013. Emma uses it to build her shop's product pages from small components.

Why it matters

React is the front-end tool many job posts ask for. Its ideas shaped many other frameworks.

Definition

React is a JavaScript library for building user interfaces out of components. You describe what the screen should look like for the current state. When the state changes, React works out what changed and updates only those parts. It uses JSX, which lets you write HTML-like tags inside JavaScript. It is the most widely used front-end library today.

Example code

jsx
function App() {
  return <Greeting name="Emma" />;
}
A React app is components inside components.

Common mistake

Putting everything in global state from day one. Keep state close to where it is used.

Key takeaways

  1. 1
    Built from components. Small parts make a screen.
  2. 2
    State drives the screen. React updates what changed.
  3. 3
    JSX. HTML-like tags in JavaScript.

Compare