react/packages/react
Luna Ruan 88574c1b8b
Fix enableTransitionTracing flag (#24801)
Move `enableTransitionTracing` to `dynamicFeatureFlags` so it runs when you run `yarn test`
2022-06-28 13:09:59 -04:00
..
npm Remove public export for unstable-shared-subset.js (#23261) 2022-02-22 20:03:51 -05:00
src React `version` field should match package.json (#24445) 2022-04-26 16:28:48 -04:00
README.md Fix import in example 2022-04-07 14:12:58 +01:00
index.classic.fb.js Fix enableTransitionTracing flag (#24801) 2022-06-28 13:09:59 -04:00
index.experimental.js Remove unstable_createMutableSource from experimental build (#24209) 2022-03-30 17:05:07 +01:00
index.js [ServerContext] Flight support for ServerContext (#23244) 2022-03-08 07:55:32 -05:00
index.modern.fb.js [ServerContext] Flight support for ServerContext (#23244) 2022-03-08 07:55:32 -05:00
index.stable.js [ServerContext] Flight support for ServerContext (#23244) 2022-03-08 07:55:32 -05:00
jsx-dev-runtime.js add jsx-runtime and jsx-dev-runtime (#18299) 2020-03-17 13:22:19 -07:00
jsx-runtime.js add jsx-runtime and jsx-dev-runtime (#18299) 2020-03-17 13:22:19 -07:00
package.json bump versions for next release (#24725) 2022-06-14 13:24:00 -07:00

README.md

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