React UI Library
react.dev
1
Leaving SiteNav
External Link Disclaimer
You are about to visit react.dev. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
React is a JavaScript library for building user interfaces that lets developers compose complex UIs from small, isolated pieces of code called components. Each component is a JavaScript function that receives data as props and returns markup describing what should appear on the screen, written in JSX syntax that combines HTML-like structure with JavaScript expressions in the same file. When a component's data changes, React re-renders it and efficiently updates the DOM by comparing the new virtual representation against the previous one, applying only the minimal set of changes needed to bring the actual DOM in sync. Hooks are the primary mechanism for adding state and side effects to function components: useState manages local state across renders, useEffect synchronizes with external systems including subscriptions and fetch calls, useMemo caches expensive computations, useCallback memoizes callback identities to prevent unnecessary re-renders of child components, and useReducer manages complex state transitions through a dispatch-based pattern. The Suspense component declaratively handles loading states by showing a fallback while asynchronous data resolves, enabling streaming server rendering where HTML is sent progressively as data becomes available. Server Components run exclusively on the server, never shipping their code to the browser, enabling direct database access and removing large dependencies from the client bundle. Now at version 19.2 and hosted under the Linux Foundation as the React Foundation, the library is used by Meta across products with over a billion users, and by companies including Netflix, Airbnb, The New York Times, and Discord. Full-stack frameworks like Next.js and React Router build on React to provide routing, data fetching, and server rendering.
Statistics
1
Views
0
Clicks
0
Like
0
Dislike