Build interfaces that update automatically when data changes
You can write code that lets the screen adjust itself based on data state, without manually manipulating complex views. React is a JavaScript library for building user interfaces for web and native apps. By designing each state of the screen as a simple view, it efficiently updates only the necessary parts when data changes.
State-based screen composition
React uses a declarative approach to build interfaces. Developers design simple views corresponding to each state of the application. When data changes, React updates efficiently and renders only the correct components. This approach makes code predictable, easy to understand, and easier to debug. Component logic is written in JavaScript rather than templates, making it easy to pass rich data throughout the application. Additionally, state is maintained separately from the DOM.
Cross-platform usage
React makes no assumptions about the rest of your technology stack. You can develop new features without rewriting existing code. You can render on the server using Node, or run mobile apps using React Native. Knowledge learned once can be utilized in various environments.
Gradual adoption and getting started
React is designed for gradual adoption from the start. You can use as much or as little as you need. You can try React through Quick Start, or add React to an existing project to use only the parts you need. If you want a powerful JavaScript toolchain when creating a new React app, you can use Create a New React App. The documentation includes multiple sections such as Quick Start, tutorials, Thinking in React, installation, UI description, adding interactivity, state management, advanced guides, API reference, support, and contribution guides.
JSX and examples
When using React, you can use syntax similar to HTML. This syntax is called JSX. JSX is not required, but it makes code more readable and gives the feeling of writing HTML. For example, using createRoot to render the HelloMessage component in a container displays the text "Hello Taylor". This example shows how React outputs content to the screen.
Contributions and license
The primary purpose of this repository is to continue evolving the React core to make it faster and easier to use. Development happens publicly on GitHub, and we thank the community for bug fixes and improvements. Reading the contribution guide tells you about the development process, how to fix bugs and propose improvements, and how to build and test changes. There is also a list of good first issues containing limited-scope bugs for beginners. React uses the MIT license.