A declarative, efficient, and flexible JavaScript library for building user interfaces. reactjs.org
Go to file
Jan Kassens fd2b3e13d3
Compiler: unfork prettier config (#30205)
Updates the prettier config to format all `.ts` and `.tsx` files in the
repo using the existing defaults and removing overrides.

The first commit in this PR contains the config changes, the second is
just the result of running `yarn prettier-all`.
2024-07-18 17:00:24 -04:00
.circleci [circleci] Inline scrape_warning_messages 2024-07-18 16:41:22 -04:00
.codesandbox Codesandbox: upgrade to Node.js 18 (#26330) 2023-03-06 15:38:03 -05:00
.github [ci] Add sizebot to gh actions 2024-07-18 16:41:22 -04:00
compiler Compiler: unfork prettier config (#30205) 2024-07-18 17:00:24 -04:00
fixtures Warn for useFormState on initial render (#30292) 2024-07-08 16:45:24 -04:00
packages [Fiber] Ensure srcset and src are assigned last on img instances (#30340) 2024-07-16 08:25:24 -07:00
scripts Compiler: unfork prettier config (#30205) 2024-07-18 17:00:24 -04:00
.editorconfig https link to editorconfig.org (#18421) 2020-03-29 15:18:52 +01:00
.eslintignore Fix ESLint and Prettier configs for React Compiler (#29073) 2024-05-15 14:02:57 -07:00
.eslintrc.js [DevTools] Print component stacks as error objects to get source mapping (#30289) 2024-07-08 18:42:58 -04:00
.git-blame-ignore-revs Update .git-blame-ignore-revs 2024-05-29 18:12:16 +09:00
.gitattributes .gitattributes to ensure LF line endings when we should 2014-01-17 16:25:53 -08:00
.gitignore feat[devtools]: add package for fusebox integration (#28553) 2024-04-12 15:29:35 +01:00
.mailmap updates mailmap entries (#19824) 2020-09-12 13:05:52 -04:00
.nvmrc [ci] Standardize node version and timezones 2024-07-12 12:53:05 -04:00
.prettierignore [prettier] Combine compiler and runtime configs 2024-06-21 12:05:29 -04:00
.prettierrc.js Compiler: unfork prettier config (#30205) 2024-07-18 17:00:24 -04:00
.watchmanconfig .watchmanconfig must be valid json (#16118) 2019-07-11 19:01:02 -07:00
babel.config.js Upgrade tests to use react/jsx-runtime (#28252) 2024-02-05 23:07:41 -05:00
CHANGELOG-canary.md Add useActionState to CHANGELOG-canary.md (#28632) 2024-03-26 13:15:08 -04:00
CHANGELOG.md Add changelog for 18.3.1 (#28932) 2024-04-26 16:03:03 -04:00
CODE_OF_CONDUCT.md revert last grammatical edit (#25067) 2022-08-10 20:14:31 +01:00
CONTRIBUTING.md Fix: Updated link in CONTRIBUTING (#25381) 2022-10-03 10:29:57 -04:00
dangerfile.js [Tooling] Update critical artifact list (#28966) 2024-05-02 07:39:10 -07:00
LICENSE [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
netlify.toml [UMD] Remove umd builds (#28735) 2024-04-17 11:15:27 -07:00
package.json Add build-for-flight-dev script to package.json (#30326) 2024-07-12 18:03:10 -04:00
react.code-workspace created a vscode workspace file for the repo (#29830) 2024-06-13 16:23:42 +01:00
ReactVersions.js Update build script to automatically generate RCs (#29736) 2024-06-03 12:21:21 -04:00
README.md [ez] Add gh actions status badges to readme 2024-07-16 12:32:40 -04:00
SECURITY.md Create SECURITY.md (#15784) 2020-01-09 14:07:41 -08:00
yarn.lock Upgrade flow to 0.235.0 (#30118) 2024-07-08 14:11:11 -04:00

React · GitHub license npm version CircleCI Status (Runtime) Build and Test (Compiler) TypeScript PRs Welcome

React is a JavaScript library for building user interfaces.

  • Declarative: React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug.
  • Component-Based: Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep the state out of the DOM.
  • Learn Once, Write Anywhere: We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using React Native.

Learn how to use React in your project.

Installation

React has been designed for gradual adoption from the start, and you can use as little or as much React as you need:

Documentation

You can find the React documentation on the website.

Check out the Getting Started page for a quick overview.

The documentation is divided into several sections:

You can improve it by sending pull requests to this repository.

Examples

We have several examples on the website. Here is the first one to get you started:

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

function HelloMessage({ name }) {
  return <div>Hello {name}</div>;
}

const root = createRoot(document.getElementById('container'));
root.render(<HelloMessage name="Taylor" />);

This example will render "Hello Taylor" into a container on the page.

You'll notice that we used an HTML-like syntax; we call it JSX. JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML.

Contributing

The main purpose of this repository is to continue evolving React core, making it faster and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React.

Good First Issues

To help you get your feet wet and get you familiar with our contribution process, we have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place to get started.

License

React is MIT licensed.