Skip to content

docs: requiresReaction warns instead of throwing - #4780

Merged
kubk merged 1 commit into
mobxjs:mainfrom
kubk:docs/requires-reaction-warns
Nov 13, 2026
Merged

kubk merged 1 commit into
mobxjs:mainfrom
kubk:docs/requires-reaction-warns

Conversation

@kubk

@kubk kubk commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Right now the documentation doesn't match the code - the code warns instead of throwing.

Making it throw is a BC break so #4759 is parked for the next major. Until then, this PR makes the docs describe the current behavior

The docs said a computed with requiresReaction: true throws when read outside
a reactive context. It only warns in development builds and still recomputes
(mobxjs#3618). Making it throw is a breaking change parked for the next major (mobxjs#4759).

Amp-Thread-ID: https://ampcode.com/threads/T-01a1d4f3-04fe-72aa-a940-b07bcddfae8d
@changeset-bot

changeset-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 68dbf9f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@kubk
kubk merged commit bf94b8e into mobxjs:main Nov 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant