Go to file
Ben Alpert 19c2649e02 Use fiber by default (#9155)
Affects our builds. But not in tests yet.
2017-03-10 17:06:02 -08:00
.github Add Flow reminder to PR template (#8805) 2017-01-17 06:34:44 -08:00
docs Reorder sections in alphabetical order (#9143) 2017-03-09 20:46:55 +00:00
eslint-rules Add test for no-primitive-constructors rule 2017-02-28 18:57:06 -08:00
examples Update Fiber debugger deps 2017-02-22 17:20:53 +00:00
fixtures Add fixture components (#8860) 2017-03-02 13:38:27 -06:00
flow re-added missing files 2017-03-02 21:52:54 +00:00
grunt Got rid of linting errors on windows machines and a number of linting warnings. (#8846) 2017-01-28 15:36:03 -08:00
gulp/tasks #8021 (#8241) 2016-11-09 16:51:02 +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 fix version 2017-02-24 17:35:27 +08:00
scripts Use fiber by default (#9155) 2017-03-10 17:06:02 -08:00
src Use fiber by default (#9155) 2017-03-10 17:06:02 -08: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 Rename rule to no-primitive-constructors 2017-02-28 18:57:06 -08:00
.flowconfig Ignore fixtures in Flow and ESLint 2017-01-17 19:26:27 +00: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 Update Travis config for new token 2016-11-30 17:17:04 -08: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 Replace Starter Kit with doc link (#8682) 2017-01-04 09:39:01 -08: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 Add script to print out a list of warnings 2017-03-02 11:37:01 -08:00
package.json [Fiber] Performance measurements (#9071) 2017-03-08 18:28:53 +00:00
yarn.lock Add script to print out a list of warnings 2017-03-02 11:37:01 -08: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