react
React is a JavaScript library for building user interfaces.
Last updated 2 years ago by gnoff .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm 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(<App />);

Documentation

See https://reactjs.org/

API

See https://reactjs.org/docs/react-api.html

Current Tags

  • 18.0.0-beta-24dd07bd2-20211208                                ...           beta (3 years ago)
  • 18.2.0                                ...           latest (2 years ago)
  • 18.3.0-next-8342a0992-20230327                                ...           next (2 years ago)
  • 18.0.0-rc.3                                ...           rc (3 years ago)

1494 Versions

Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |