GitShow/facebook/react
react

react

The library for web and native user interfaces.

by react
declarativefrontendjavascriptlibraryreactui
Star on GitHubForkWebsitenpm

JavaScript

246.1k stars51.1k forks2.0k contributorsActive · 9h agoSince 2013v19.2.7MIT

Meet the team

See all 1992 on GitHub →
sebmarkbage
sebmarkbage1.9k contributions
zpao
zpao1.8k contributions
gaearon
gaearon1.7k contributions
acdlite
acdlite1.4k contributions
sophiebits
sophiebits1.3k contributions
josephsavona
josephsavona1.2k contributions
poteto
poteto816 contributions
jimfb
jimfb456 contributions

Languages

View on GitHub →
JavaScript49.2%
Rust26.1%
TypeScript22.6%
HTML1%
CSS0.8%
CoffeeScript0.2%
Other0.1%

Commit activity

Last 12 weeks · 102 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
100
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 9h ago
See all on GitHub →
UditDewan
[Perf Tracks] Don't enumerate typed array props in devOpenPR

Summary Fixes #36200. Passing a large (e.g. ) as a prop freezes rendering in development mode since 19.2 (production is unaffected). The Performance Tracks property logger in recurses into object prop values via , which enumerates them with . For a typed array this forces the engine to materialize a string key for every index up front before the loop body runs, so the existing early- (at 100 entries) never helps. A 25M-element array takes ~2s+ just to set up the enumeration, and the render appears to hang. Quick repro of the underlying cost: This change skips enumeration for typed arrays and instead shows the type and length (e.g. ), which is fast and more useful than a truncated list of numeric indices. and have no enumerable indexed properties, so they were never affected and keep their existing behavior. The guard is added in two places: — the path used for component props (the reported case), producing the descriptor. — a defensive early return so the direct callers in Flight (e.g. resolved async values) also can't hit the slow enumeration. How did you test this change? Added a regression test () asserting the compact output. Updated the existing test to use a plain wide object so it keeps exercising the truncation (typed arrays no longer reach that path). — all pass. — clean. ESLint/Prettier — clean.

UditDewan · 2m ago

Recent fixes

View closed PRs →
ousamabenyounes
[compiler] Treat TS overload-signature ids as non-references in BlockStatement hoistMergedPR

Summary Fixes #34378. When a TypeScript function overload signature shares a name with its implementation , babel's returns for the overload-signature id (the binding's path resolves to the impl, so the signature is seen as a reference to it). The BlockStatement hoist analysis in then treats the impl as needing hoisting and lowers it to plus . Inside a reactive memo block the codegen emits: In strict mode (which the compiler output targets, being ESM) the bare declaration is block-scoped to the , so the outer is never assigned and the returned object captures . Consumers then call the destructured and crash with . The fix: skip overload-signature ids () in the hoist visitor. They are type-only and erased at runtime, so they should not influence the lowering of the impl. With the fix, the compiled output for the same input keeps inside the memo block as a local : How did you test this change? Added a fixture reproducing the bug pattern (two TS overload signatures + an impl returned via a hook object). → passes. Full compiler suite: → 1720 Tests, 1720 Passed, 0 Failed. → clean. on touched files → clean. Test verification (RED → GREEN) RED — fixture with the prod fix reverted (the new test fails as expected, since the compiled output crashes at runtime): GREEN — with the prod fix applied:

ousamabenyounes · 24m ago
ousamabenyounes
fix(compiler): treat underscore-prefixed JSX tags as componentsMergedPR

Summary Fixes #36601 The React Compiler was using a regex check to determine whether a JSX tag is a component or a builtin (host) element. This meant that tags prefixed with underscore (e.g., `a-z{() => }_templowerJsxElementName()BuildHIR.tsbuiltin-jsx-tag-lowered-between-mutationsglobal-jsx-tag-lowered-between-mutationscompiler/.../fixtures/compiler/jsx-underscore-prefixed-tag-is-component.tsx.expect.mdyarn snap -p 'underscore'/^[a-z]/_Bar/^[A-Z]/_Bar` and throws at runtime — diverging from the non-compiled reference. The fixture catches exactly this regression.

ousamabenyounes · 24m ago
ousamabenyounes
[Fiber] Warn when useMemo is called with a non-function first argumentMergedPR

Summary Fixes #16589. When was called with a non-function first argument (a common mistake, e.g. passing the memoized value directly instead of a factory), React threw from inside . The stack pointed at React internals and most developers had no idea what referred to — the error didn't name the hook or the component involved. Add a DEV-only warning mirroring the existing warning. The DEV warning fires before the TypeError and names the hook plus the actual of the value received, so the developer sees a component-attributed message pointing at their own code: Expected useMemo() first argument to be a function that returns a value. Instead received: object. in App (at …) Prod behaviour is unchanged — the still surfaces as before. Repro Before: with a stack inside , no hint at which component/hook. After: DEV warning names + the actual type () with a component stack, then the TypeError surfaces if the bug isn't fixed. How did you test this change? New test in — models on the neighbouring tests. : 73 passed / 0 failed (72 baseline + 1 new). : 72 passed / 0 failed — the assertion is a no-op in prod and the still holds. : 96 passed / 0 failed. : 7 passed / 0 failed. — clean. — clean. — clean. 🤖 Generated with Ora Studio _Vibe Coded by Ousama Ben Younes_ _Developed With Ora Studio (Claude Code)_

ousamabenyounes · 24m ago
Structured data for AI agents

Repository: react/react. Description: The library for web and native user interfaces. Stars: 246123, Forks: 51121. Primary language: JavaScript. Languages: JavaScript (49.2%), Rust (26.1%), TypeScript (22.6%), HTML (1%), CSS (0.8%). License: MIT. Homepage: https://react.dev Topics: declarative, frontend, javascript, library, react, ui. Latest release: v19.2.7 (4w ago). Open PRs: 100, open issues: 1159. Last activity: 9h ago. Community health: 100%. Top contributors: sebmarkbage, zpao, gaearon, acdlite, sophiebits, josephsavona, poteto, jimfb, eps1lon, trueadm and others.

·@ofershap

Replace github.com with gitshow.dev