Go to file
Andrew Clark f6a64cad5d Use radio buttons for toggle 2017-03-27 12:48:05 -07:00
.github Add prettier instructions to PR template and contribution guide 2017-03-16 11:53:44 -07:00
docs Fixed typo on implementation notes page (#9258) 2017-03-25 20:57:28 -05:00
eslint-rules Add test for no-primitive-constructors rule 2017-02-28 18:57:06 -08:00
examples Use radio buttons for toggle 2017-03-27 12:48:05 -07:00
fixtures Fix Chrome number input backspace and invalid input issue (#7359) 2017-03-27 11:39:18 -05:00
flow Added new fiber-based renderer for native dubbed ReactNativeFiber 2016-12-14 18:39:22 -08:00
grunt Delete addons (#9209) 2017-03-20 16:15:01 +00:00
gulp/tasks Delete addons (#9209) 2017-03-20 16:15:01 +00:00
mocks Year-agnostic copyright message, like React Native uses, to prevent the need for yearly changes. 2015-12-29 20:20:32 +01:00
packages Updating packages for 16.0.0-alpha.6 release 2017-03-24 15:44:09 -07:00
scripts Fix Chrome number input backspace and invalid input issue (#7359) 2017-03-27 11:39:18 -05:00
src Fix Chrome number input backspace and invalid input issue (#7359) 2017-03-27 11:39:18 -05:00
.babelrc Update to babel-plugin-transform-es2015-block-scoping 6.23 (#9002) 2017-02-14 11:24:01 -08:00
.editorconfig Add insert_final_newline to editorconfig 2015-09-03 13:43:42 -07:00
.eslintignore Move webcomponents.js polyfill to mocks (#8993) 2017-02-27 18:35:05 -08:00
.eslintrc.js Fix lint rules 2017-03-14 14:12:35 -07:00
.flowconfig Upgraded Flow dev dependency to 41 for 'implements' support (#9196) 2017-03-16 17:12:50 -07:00
.gitattributes .gitattributes to ensure LF line endings when we should 2014-01-17 16:25:53 -08:00
.gitignore Remove fixture react build files from git tracking 2017-01-06 16:27:59 -06:00
.mailmap Update authors for v15 2016-04-04 09:46:23 -07:00
.travis.yml Delete addons (#9209) 2017-03-20 16:15:01 +00:00
AUTHORS Update authors for v15 2016-04-04 09:46:23 -07:00
CHANGELOG.md Add missing entry for #7750 to 15.4.2 changelog 2017-01-09 14:15:35 +00:00
CONTRIBUTING.md Move How to Contribute to documentation and update it (#7817) 2016-09-27 23:20:49 +01:00
Gruntfile.js Delete addons (#9209) 2017-03-20 16:15:01 +00:00
LICENSE Year-agnostic copyright message, like React Native uses, to prevent the need for yearly changes. 2015-12-29 20:20:32 +01:00
LICENSE-docs Update licenses for docs and examples 2014-10-22 12:35:08 -07:00
LICENSE-examples Update licenses for docs and examples 2014-10-22 12:35:08 -07:00
PATENTS Update Patent Grant 2015-04-10 12:15:29 -07:00
README.md Replace Starter Kit with doc link (#8682) 2017-01-04 09:39:01 -08:00
circle.yml Support parallelism on Circle (#8511) 2016-12-07 14:55:34 -08:00
gulpfile.js Delete addons (#9209) 2017-03-20 16:15:01 +00:00
package.json Updating packages for 16.0.0-alpha.6 release 2017-03-24 15:44:09 -07:00
yarn.lock Upgraded Flow dev dependency to 41 for 'implements' support (#9196) 2017-03-16 17:12:50 -07:00

README.md

React · CircleCI Status Build Status Coverage Status npm version 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.

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 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 Bug

To help you get your feet wet and get you familiar with our contribution process, we have a list of good first bugs that contain bugs which are fairly easy to fix. This is a great place to get started.

License

React is BSD licensed. We also provide an additional patent grant.

React documentation is Creative Commons licensed.

Examples provided in this repository and in the documentation are separately licensed.

Troubleshooting

See the Troubleshooting Guide