+
Skip to content

Conversation

barklund
Copy link

@barklund barklund commented Oct 3, 2025

Summary

This PR updates Biome’s React integration to reflect the React 19.2 release:

  • useEffectEvent is now treated like useRef in the useExhaustiveDependencies rule:
    • Effect Events are stable, ref-like values that may be excluded from dependency arrays.
  • <Activity /> and useEffectEvent has been added to the list of known React components.

Fixes #7631.

Test Plan

All tests pass locally.

Docs

No new user-facing rules or options introduced.
No documentation updates required beyond the implicit coverage in the existing rule docs.

Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: 670a59b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Oct 3, 2025
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Adds React 19.2 support by recognising useEffectEvent as a stable, ref‑like hook in the useExhaustiveDependencies lint so its return value is never added to dependency arrays. Extends VALID_REACT_API to include Activity and useEffectEvent. Updates tests to cover useEffectEvent in both valid and invalid dependency scenarios. No changes to exported/public API signatures.

Suggested reviewers

  • siketyan
  • ematipico
  • dyc3

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely and accurately summarises the primary change by indicating the addition of React 19.2 support within the biome_js_analyze module, follows conventional commit style, and aligns directly with the diff’s focus on useEffectEvent and Activity updates.
Linked Issues Check ✅ Passed The changes fully address issue #7631 by treating useEffectEvent as a stable, ref-like hook in useExhaustiveDependencies, adding corresponding tests, and extending the known React API list with both useEffectEvent and Activity.
Out of Scope Changes Check ✅ Passed All modifications are tightly scoped to React 19.2 support—updating the exhaustive-deps rule, React API list, tests, and changeset—without introducing any unrelated code changes.
Description Check ✅ Passed The description clearly outlines the React 19.2 integration updates—including useEffectEvent handling, Activity recognition, linked issue reference, and test plans—which all map directly to the changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b043515 and 670a59b.

📒 Files selected for processing (1)
  • .changeset/upset-apes-reply.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/upset-apes-reply.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@siketyan
Copy link
Member

siketyan commented Oct 3, 2025

Thank you! Please add a changeset as the bot suggests

@barklund barklund changed the title feat: added support for React 19.2 feat(biome_js_analyze): added support for React 19.2 Oct 3, 2025
Copy link

codspeed-hq bot commented Oct 3, 2025

CodSpeed Performance Report

Merging #7669 will not alter performance

Comparing barklund:react-19.2 (670a59b) with next (357b8f7)

Summary

✅ 53 untouched
⏩ 85 skipped1

Footnotes

  1. 85 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please send the PR towards the next branch, as explained in the contribution guideline

@barklund barklund changed the base branch from main to next October 3, 2025 15:03
added new hook to `useExhaustiveDependencies` and added new API to API list
@barklund
Copy link
Author

barklund commented Oct 3, 2025

Please send the PR towards the next branch, as explained in the contribution guideline

My bad, I did see that but clearly forgot again. I have now rebased to next and changed the PR target.

@barklund barklund requested a review from ematipico October 3, 2025 17:18
@rortan134

This comment was marked as spam.

@dyc3
Copy link
Contributor

dyc3 commented Oct 13, 2025

@barklund It looks like the CI is still failing. Could you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📎 React 19.2: add useEffectEvent semantics to useExhaustiveDependencies and recognise <Activity />

5 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载