fix: harden runtime hooks and speed up early React useFiber - #111
Merged
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow up on the runtime robustness audit and the request to check
useFiberperformance. Root README and unrelated kitchen-sink work are unchanged.useFiberperformancepnpm --filter conformance bench:use-fiber: actual production ESM, isolated React versions, with/without-hook baselines, 100/1,000 components, and 32-preceding-hook cases. Timing is diagnostic, not a flaky CI threshold.One local Node 24.20.0 / Happy DOM run, 1,000 null-rendering components, no preceding hooks, median of five samples:
The meaningful improvement is the early-React root-search reduction. Modern-React timing differences are small and are not claimed as a guaranteed speedup. These synthetic results are not browser/mobile guarantees.
Runtime robustness
Intentional error-contract change: synchronous listener exceptions now go to
console.errorinstead of escaping and stopping dispatch. Reporting failures are contained too. React's injection error handling otherwise prevents it from retaining the hook for future commits. Rejected promises and a foreign hook's own failinginjectimplementation are not isolated.Remaining boundaries
bindremains unsupported. Updates after successful capture still avoid bind assignments and passive effects.useFiberis not universally constant-time.Validation
pnpm test:conformance: 1,835 passed, two existing skips, plus typechecks, production build, and all four development/production × ESM/CJS packaged checks. The builtuse no memoguard passes.packages/bippy/distremoved. The shared Fiber fixture now uses an explicit source import, so it also works in the isolated unit project without a build or a bare-package alias.pnpm check: no errors, two existing E2E warnings.f1f7ed2ac267a21dd2e3e67c4a606b9cf56e360b.Source review used the local
facebook/reactcheckout:ReactFiberDevToolsHook.js,ReactFiberTreeReflection.js, hook cloning/reducer internals, and the React 18.3.1 DevTools Suspense traversal with its pre-Offscreen compatibility path. Audit findings, contracts, benchmark methodology, and remaining limitations live inpackages/conformance/README.md.