React: Build web and native interfaces with components and declarative views
React is a JavaScript library that builds web, Node server-rendered, and React Native interfaces with components and JSX.
GitHub react/react Updated 2026-11-07 Branch main Stars 252.3K Forks 51.8K
JavaScript User interfaces JSX React Native

🧭 Decision Guide

Try it if you

  • You need interactive UIs that update with data and want Declarative views to simplify debugging
    The README's Declarative section says React updates and renders the right components as data changes
  • You want to add React gradually to an Existing Project instead of rewriting the current stack
    The README's Installation section provides Add React to an Existing Project and says you can use as little or as much React as needed
  • Your product involves Node server rendering or React Native mobile applications
    The README's Learn Once, Write Anywhere section explicitly mentions Node and React Native

Skip it if you

  • Your team does not accept JavaScript component logic and requires all logic to live in templates
    The README's Component-Based section explicitly says component logic is written in JavaScript instead of templates
  • Your mobile approach does not use React Native and requires another mobile runtime documented by the README
    The README only names React Native as the mobile-app approach in Learn Once, Write Anywhere

Requirements

  • JavaScript is required because the README describes React as a JavaScript library and places Component-Based logic in JavaScript
  • To run the README example as written, the page needs a DOM node with id="container" and uses createRoot from react-dom/client
  • For server rendering, the README points to Node; for mobile applications, it points to React Native

First step (verbatim from README)

const root = createRoot(document.getElementById('container'));

Watch out

  • JSX is not mandatory, but the README example uses JSX; do not treat the example syntax as the only API
    The README's Examples section explicitly says JSX is not required to use React
  • The createRoot example requires a container DOM node; without it, the example cannot render as written
    The README's Examples code calls document.getElementById('container')
  • The README associates React Native with mobile applications but does not detail native integration
    The README's Learn Once, Write Anywhere section only says React Native can power mobile apps

Alternatives

  • React Native:When the target is a mobile application rather than the browser DOM interface shown in the README example
    Learn Once, Write Anywhere

Not stated in the README

  • The README does not specify supported browser, Node, or TypeScript versions
  • The README does not specify production build tools, bundling configuration, or deployment flow
  • The README provides no performance benchmarks or runtime-overhead data for React 19.3.1
  • The README does not specify the APIs, data-fetching approach, or caching strategy for Node server rendering
  • The README does not specify React Native native modules, platform versions, or app-release flow
  • The README does not specify security policy, long-term support periods, or issue-response times

💡 Deep Analysis

6
Yes I need to integrate a UI library into a commercial JavaScript product and want to allow internal modifications and secondary integration. Does React’s license fit this constraint?
For: A JavaScript frontend engineer planning to integrate React into a commercial product under MIT licensing requirements

Yes. The project data and README show that React uses the MIT License, which generally fits commercial integration, internal modification, and secondary use with a relatively low licensing barrier.

  • The project data explicitly lists “MIT License.”
  • The README’s License section repeats, “React is MIT licensed,” making the licensing information directly verifiable in the repository.
  • React is positioned as a library for web and native user interfaces, so it can serve as a product dependency without requiring a particular backend or deployment architecture.
  • License fit does not complete all compliance work; the README does not specify which copyright, license text, or third-party notices the company must retain.
  • Project data: license = "MIT License"
  • License: "React is MIT licensed"
  • Project description: "The library for web and native user interfaces"
Not stated in the README:The README does not list the exact copyright and license notices required for commercial distribution;It does not specify license requirements for build tools, renderers, or third-party dependencies outside the React repository;A final compliance conclusion still depends on the company’s distribution model and legal policy
Yes I maintain an existing JavaScript project and cannot rewrite every page at once. I only want to convert one interactive module to React first. Is React suitable for this gradual migration?
For: A frontend engineer maintaining an existing JavaScript site who wants to introduce React feature by feature

Yes, because the README explicitly supports using a small or large amount of React in an existing project without requiring a full rewrite or a prescribed technology stack.

  • “React has been designed for gradual adoption from the start,” with an “Add React to an Existing Project” path.
  • React makes no assumptions about the rest of the stack, so existing JavaScript pages can remain while new features use components and JSX.
  • Components can encapsulate their own state and be composed into a larger interface, which fits a bounded interactive module.
  • React only covers the user-interface layer; routing, data fetching, and build tooling still belong to the existing project or other tools.
  • Installation: "React has been designed for gradual adoption from the start"
  • Installation: "Add React to an Existing Project"
  • README: "We don't make assumptions about the rest of your technology stack"
  • Project insight: React is a UI library rather than an end-to-end application framework
Not stated in the README:The README does not specify integration with the existing project's build tool, routing solution, or data layer;It does not explain style isolation, shared state, or page-level error handling for partial mounting
Yes I want to build an interactive interface with JavaScript and JSX, but I do not want React to dictate routing, backend, or data-fetching choices. Should I choose React under this constraint?
For: A frontend engineer building a new JavaScript application without adopting a complete full-stack framework

Yes, because the README defines React as a JavaScript library for building user interfaces rather than a framework that dictates a complete application architecture.

  • The README says React makes no assumptions about the rest of the technology stack, so it does not prescribe routing, backend, or data-fetching implementations.
  • JSX provides HTML-like interface syntax, but it is not required to use React, allowing the team to choose according to its toolchain.
  • Components can receive props, manage their own state, and be composed, covering UI structure and interaction.
  • The tradeoff is that a new application still needs choices for routing, data loading, forms, testing, build, and deployment; “Create a New React App” points to a JavaScript toolchain but does not define a complete architecture.
  • README: "React is a JavaScript library for building user interfaces"
  • README: "We don't make assumptions about the rest of your technology stack"
  • Examples: "JSX is not required to use React"
  • Installation: "Create a New React App"
Not stated in the README:The README does not specify recommended tools for routing, data fetching, forms, testing, or deployment;It does not specify configuration and compatibility requirements between the target JavaScript toolchain and React 19.3.1
Yes I need to maintain both a web interface and a React Native mobile app, and I want to reuse component-based, state-driven development ideas. Is React suitable?
For: A JavaScript engineer planning a React Native mobile app while also maintaining a web interface

Yes for reusing the development model, but not for assuming that web components can be reused unchanged across platforms. The README positions React as a library for web and native user interfaces and explicitly mentions React Native for mobile apps.

  • “Learn Once, Write Anywhere” indicates that components, props, state, and composition can transfer across hosts.
  • The README explicitly says React can “power mobile apps using React Native.”
  • React does not bind the rest of the technology stack, so web and React Native can choose platform-specific navigation, styling, and build tools.
  • However, platform controls, the DOM, navigation, and styling differ; the reusable boundary is usually the programming model and some logic, not every rendering component.
  • README: "Learn Once, Write Anywhere"
  • README: "power mobile apps using React Native"
  • Project description: "The library for web and native user interfaces"
  • Project insight: cross-platform reuse mainly covers component concepts and some logic
Not stated in the README:The README does not specify what proportion of components can be shared directly between web and React Native;It does not specify choices for mobile navigation, native modules, styling, or build tooling
Yes I maintain a large JavaScript frontend with many interactive states and currently rely on manual DOM manipulation. Should I use React to restructure component boundaries and state updates?
For: A frontend engineer responsible for a large, long-lived JavaScript application with complex interactions

Yes, especially when the goal is to split a complex interface into composable units and reduce manual DOM synchronization. React’s declarative and component-based model directly matches that constraint.

  • The README says developers design simple views for each application state, while React updates the right components when data changes, reducing individual DOM operations.
  • “Build encapsulated components that manage their own state” supports encapsulating interaction logic and local state.
  • Components can be composed into complex UIs, which fits decomposition by feature and responsibility in a large application.
  • React does not automatically solve every performance problem; state placement, component boundaries, and broad updates still depend on application design.
  • README: "Design simple views for each state in your application"
  • README: "React will efficiently update and render just the right components when your data changes"
  • README: "Build encapsulated components that manage their own state"
  • Project insight: the declarative model does not automatically eliminate performance problems
Not stated in the README:The README does not specify the amount of existing DOM code, performance bottlenecks, or component boundaries;It does not specify constraints from the application's existing state-management, testing, or build tools
It depends I already use Node for server-side rendering and want the browser and server to share React’s component model. Can React meet this constraint?
For: A JavaScript engineer building a complex web interface with server-side rendering on Node

It depends: React supports server rendering with Node, but the README does not include a complete SSR application framework, routing system, or data-loading solution.

  • The README explicitly states, “React can also render on the server using Node,” so the core rendering model fits a Node server-rendering requirement.
  • Declarative views describe the interface from application state, and component logic is written in JavaScript, enabling a shared UI programming model.
  • React makes no assumptions about the rest of the stack, allowing the team to choose its own routing, data-fetching, and deployment tools.
  • However, server components, streaming, client hydration, and cache boundaries are not promised by this README, so React Core alone does not confirm a complete SSR solution.
  • README: "React can also render on the server using Node"
  • README: "Declarative"
  • README: "Component-Based"
  • Project insight: server rendering usually depends on a corresponding framework, renderer, or platform tool
Not stated in the README:The README does not specify the SSR framework, rendering APIs, or hydration flow for the target React version;It does not specify implementation details for server data fetching, streaming, caching, or error recovery

✨ Highlights

  • Declarative views update the right components as data changes, simplifying debugging
  • Composable components manage their own state with logic in JavaScript instead of templates
  • React 19.3.1 supports server rendering with Node and mobile apps with React Native

🔧 Engineering

  • Use JSX and createRoot to render HelloMessage into a DOM container
  • Learn React through Quick Start, Tutorial, and Managing State
  • Adopt it gradually in an Existing Project or create a new JavaScript toolchain

⚠️ Risks

  • The README gives no Node, browser, or build-tool versions, leaving compatibility boundaries unclear
  • The Examples depend on a DOM node named container and do not document server-rendering setup
  • Mobile support only points to React Native; the README does not explain native modules or release flow

👥 For who?

  • Teams building interactive web UIs and willing to manage component state in JavaScript
  • Developers adding React gradually to an existing project instead of rewriting the full stack
  • Teams considering Node server rendering or React Native mobile applications