A declarative, efficient, and flexible JavaScript library for building user interfaces.
JavaScript C++ HTML TypeScript CoffeeScript Shell Other
Switch branches/tags
Permalink
Failed to load latest commit information.
.circleci CI: remove unnecessary Yarn download (#11684) Nov 28, 2017
.github Oops Dec 7, 2017
fixtures Refactor DOM attribute code (take two) (#11815) Dec 10, 2017
packages use different eslint config for es6 and es5 (#11794) Dec 11, 2017
scripts Update Rollup deps (#11829) Dec 11, 2017
.babelrc Compile spread to Object.assign calls (#10387) Aug 4, 2017
.editorconfig Add insert_final_newline to editorconfig Sep 3, 2015
.eslintignore Use Yarn Workspaces (#11252) Oct 18, 2017
.eslintrc.js Stop ESLint from looking for a configuration file in parent folders (#… Nov 28, 2017
.flowconfig Unify the way we fork modules (#11711) Nov 30, 2017
.gitattributes .gitattributes to ensure LF line endings when we should Jan 18, 2014
.gitignore Added a .watchmanconfig file (#11581) Nov 17, 2017
.mailmap Update .mailmap Sep 6, 2017
.nvmrc Add new docs website (#10896) Sep 28, 2017
.watchmanconfig Added a .watchmanconfig file (#11581) Nov 17, 2017
AUTHORS Update authors for v16 (#10861) Sep 27, 2017
CHANGELOG.md Add 16.2.0 to changelog Nov 28, 2017
CODE_OF_CONDUCT.md Add `CODE_OF_CONDUCT.md` (#11512) Nov 10, 2017
CONTRIBUTING.md [Gatsby] "https://facebook.github.io/react/" -> "https://reactjs.org/" ( Sep 30, 2017
LICENSE Change license and remove references to PATENTS Sep 26, 2017
README.md docs(readme): correct link for "your first PR" (#11489) Nov 8, 2017
appveyor.yml Disable Flow on AppVeyor Nov 29, 2017
package.json Update Rollup deps (#11829) Dec 11, 2017
yarn.lock Update Rollup deps (#11829) Dec 11, 2017

README.md

React · CodeGayHub license npm version Coverage Status CircleCI Status 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 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 own project.

Documentation

You can find the React documentation on the website.
It 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:

class HelloMessage extends React.Component {
  render() {
    return <div>Hello {this.props.name}</div>;
  }
}

ReactDOM.render(
  <HelloMessage name="John" />,
  document.getElementById('container')
);

This example will render "Hello John" 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. We recommend using Babel with a React preset to convert JSX into native JavaScript for browsers to digest.

Installation

React is available as the react package on npm. It is also available on a CDN.

React is flexible and can be used in a variety of projects. You can create new apps with it, but you can also gradually introduce it into an existing codebase without doing a rewrite.

The recommended way to install React depends on your project. Here you can find short guides for the most common scenarios:

Contributing

The main purpose of this repository is to continue to evolve React core, making it faster and easier to use. Development of React happens in the open on CodeGayHub, 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 which have a relatively limited scope. This is a great place to get started.

License

React is MIT licensed.