⚛️

React

React is a free, open-source JavaScript library for building user interfaces, created and maintained by Meta. It's the most-used frontend tool in the world, reported in roughly 44.7% of developer surveys. It's built around small, reusable components and a virtual DOM that efficiently updates only what changed, which is why it became the default building block for modern web UIs.

Quick facts
Type: Frontend UI library (component-based)
Made by: Meta (Facebook)
License: Free / open-source (MIT)
Language: JavaScript / TypeScript
Primary use case: Building interactive, component-driven user interfaces for web (and via React Native, mobile) apps
Jump to: ExampleGetting startedBest for

Example

A functional component with the useState hook is the standard way to add local state to a React component.

import { useState } from 'react';

function Counter() {
  const [count, setCount] = useState(0);

  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>
        Click me
      </button>
    </div>
  );
}

export default Counter;

Getting started

Modern React projects are usually scaffolded with a build tool like Vite rather than a standalone install.

# scaffold a new React project with Vite
npm create vite@latest my-app -- --template react

cd my-app
npm install
npm run dev
Best for: Interactive single-page apps and dashboards where the UI is built from many reusable, stateful pieces — and where you want the largest possible hiring pool and ecosystem of components to draw from.