A declarative, efficient, and flexible JavaScript library for building user interfaces. reactjs.org
Go to file
2017-09-26 11:39:18 +01:00
.github Merge pull request #9187 from acdlite/prettierci 2017-03-24 09:48:44 -05:00
addons 15.6.2 2017-09-25 17:02:44 -07:00
docs Tweak blog post to match others 2017-09-26 11:39:18 +01:00
eslint-rules 15.x: File headers BSD+Patents -> MIT 2017-09-25 17:02:43 -07:00
examples Remove examples/ folder (#9323) 2017-04-07 14:05:17 -07:00
fixtures [#9712] fix <input type="number" /> value '.98' should not be equal to '0.98'. (#9714) (#9929) 2017-06-12 10:10:24 -07:00
flow 15.x: File headers BSD+Patents -> MIT 2017-09-25 17:02:43 -07:00
grunt 15.x: BSD+Patents -> MIT 2017-09-25 17:02:44 -07:00
gulp/tasks 15.x: File headers BSD+Patents -> MIT 2017-09-25 17:02:43 -07:00
mocks 15.x: File headers BSD+Patents -> MIT 2017-09-25 17:02:43 -07:00
packages Merge branch '15.6-dev' into 15-stable 2017-09-25 17:06:40 -07:00
scripts Merge branch '15.6-dev' into 15-stable 2017-09-25 17:06:40 -07:00
src 15.6.2 2017-09-25 17:02:44 -07:00
.babelrc Add babel-plugin-transform-class-properties (#7322) 2016-08-12 16:00:08 -07:00
.editorconfig Add insert_final_newline to editorconfig 2015-09-03 13:43:42 -07:00
.eslintignore Lint and test addons on CI (#9936) 2017-06-12 21:26:56 +01:00
.eslintrc.js Add build process for createReactClass (#9943) 2017-06-13 15:00:10 +01:00
.flowconfig Provide non-standard stack with invalid type warnings (#9679) 2017-05-15 20:39:39 +01:00
.gitattributes .gitattributes to ensure LF line endings when we should 2014-01-17 16:25:53 -08:00
.gitignore Remove examples/ folder (#9323) 2017-04-07 14:05:17 -07:00
.mailmap Update authors for v15 2016-04-04 09:46:23 -07:00
.travis.yml Merge branch '15-dev' into 15-stable 2016-11-16 14:08:52 +00:00
AUTHORS Update authors for v15 2016-04-04 09:46:23 -07:00
CHANGELOG.md 15.x: BSD+Patents -> MIT 2017-09-25 17:02:44 -07:00
circle.yml Try to enable Yarn on 15-stable (#9971) 2017-06-15 00:59:07 +01:00
CONTRIBUTING.md Move How to Contribute to documentation and update it (#7817) 2016-09-27 23:22:32 +01:00
Gruntfile.js Remove unused build tasks 2017-06-15 00:22:06 +01:00
gulpfile.js 15.x: File headers BSD+Patents -> MIT 2017-09-25 17:02:43 -07:00
LICENSE 15.x: BSD+Patents -> MIT 2017-09-25 17:02:44 -07: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
package.json 15.6.2 2017-09-25 17:02:44 -07:00
README.md 15.x: BSD+Patents -> MIT 2017-09-25 17:02:44 -07:00
yarn.lock Update yarn.lock file 2017-08-10 13:41:24 -04:00

React 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. If you're interested in helping with that, check out our contribution guide.

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.

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 MIT licensed.

React documentation is Creative Commons licensed.

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

Troubleshooting

See the Troubleshooting Guide