The library for web and native user interfaces
Go to file
Henry Q. Dineen b4cbdc5a7c
remove terser from react-compiler-runtime build (#31326)
## Summary

This fixes a minor nit I have about the `react-compiler-runtime` package
in that the published code is minified. I assume most consumers will
minify their own bundles so there's no real advantage to minifying it as
part of the build.

For my purposes it makes it more difficult to read the code, use
`patch-package` (if needed), or diff two versions without referencing
the source code on github or mapping it back to original source using
the source maps.

## How did you test this change?

I ran the build locally and looked at the result but did not run the
code. It's a lot more readable except for the commonjs
compatibility-related stuff that Rollup inserts.
2024-10-22 19:49:10 -04:00
.codesandbox Codesandbox: upgrade to Node.js 18 (#26330) 2023-03-06 15:38:03 -05:00
.github [ez] Update compiler issue template (#31297) 2024-10-18 15:02:26 -04:00
compiler remove terser from react-compiler-runtime build (#31326) 2024-10-22 19:49:10 -04:00
fixtures Rename SSRManifest to ServerConsumerManifest (#31299) 2024-10-19 20:45:20 -04:00
packages react-hooks/rules-of-hooks: Add support for do/while loops (#28714) 2024-10-22 13:07:10 -07:00
scripts tests[react-devtools]: added tests for Compiler integration (#31241) 2024-10-17 09:02:41 +01: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 [flow] Eliminate usage of more than 1-arg React.AbstractComponent in React codebase (#31314) 2024-10-21 16:17:41 -07:00
.git-blame-ignore-revs Add run prettier commit to .git-blame-ignore-revs 2024-07-18 17:42:45 -04: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] Ignore compiler/target (#31168) 2024-10-10 10:53:27 -04:00
.prettierrc.js [BE] switch to hermes parser for prettier (#30421) 2024-07-22 19:16:13 -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 [ci] Cleanup more references to circleci 2024-07-29 19:18:03 -04: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 Bump rollup from 3.20.0 to 3.29.5 (#31072) 2024-09-26 09:56:33 -04:00
react.code-workspace created a vscode workspace file for the repo (#29830) 2024-06-13 16:23:42 +01:00
ReactVersions.js [Fax] Make react-markup publishable via scripts (#30722) 2024-08-16 21:08:20 +02:00
README.md [ez] Remove circleci badge from readme 2024-07-29 13:26:14 -04:00
SECURITY.md Create SECURITY.md (#15784) 2020-01-09 14:07:41 -08:00
yarn.lock Bump rollup from 3.20.0 to 3.29.5 (#31072) 2024-09-26 09:56:33 -04:00

React · GitHub license npm version (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.