arrow_back_ios_new

Gitgram

facebook/react

react

facebook

A declarative, efficient, and flexible JavaScript library for building user interfaces.

README.md

React is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies.

React can be used as a base in the development of single-page or mobile applications. Complex React applications usually require the use of additional libraries for state management, routing, and interaction with an API.

Key Features

  • Component-Based: Build encapsulated components that manage their own state, then compose them to make complex UIs.
  • 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.
  • Learn Once, Write Anywhere: 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.

Installation

React is available as a package on npm. You can install it using:

npm install react react-dom

Example Usage

import React from 'react';
import ReactDOM from 'react-dom';
function HelloWorld() {
  return <h1>Hello, world!</h1>;
}
ReactDOM.render(<HelloWorld />, document.getElementById('root'));