react
React is a JavaScript library for building user interfaces.
Last updated 2 years ago by react-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install react 
SYNC missed versions from official npm registry.

react

React is a JavaScript library for creating user interfaces.

The react package contains only the functionality necessary to define React components. It is typically used together with a React renderer like react-dom for the web, or react-native for the native environments.

Note: by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the production build when deploying your application.

Usage

import { useState } from 'react';
import { createRoot } from 'react-dom/client';

function Counter() {
  const [count, setCount] = useState(0);
  return (
    <>
      <h1>{count}</h1>
      <button onClick={() => setCount(count + 1)}>
        Increment
      </button>
    </>
  );
}

const root = createRoot(document.getElementById('root'));
root.render(<Counter />);

Documentation

See https://react.dev/

API

See https://react.dev/reference/react

Current Tags

  • 19.1.10                                ...           backport (a month ago)
  • 19.0.0-beta-26f2496093-20240514                                ...           beta (3 years ago)
  • 19.3.0-canary-edae846a-20261125                                ...           canary (3 days ago)
  • 0.0.0-experimental-edae846a-20261125                                ...           experimental (3 days ago)
  • 19.3.1                                ...           latest (a month ago)
  • 19.3.0-canary-d5736f09-20260507                                ...           next (7 months ago)
  • 19.0.0-rc.1                                ...           rc (2 years ago)

3025 Versions

Downloads
Total 25,370
Today 0
This Week 0
This Month 6,755
Last Day 77
Last Week 1,061
Last Month 4,345
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (218)

© 2010 - cnpmjs.org x YWFE | Home | YWFE