Bug: React 19.2 component performance track causes side-effects in mobx -> add way to disable?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 251k
- Forks
- 51.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 53
Description
React version: 19.2.x
Steps To Reproduce
See https://github.com/mobxjs/mobx/issues/4607
The new component performance track causes side-effects (warnings) with mobx since the component performance tracks does a (deep) comparison of component properties.
This happens outside of a mobx reaction which causes the warning.
Link to code example:
React 19.2.3 (warnings): https://codesandbox.io/p/sandbox/component-performace-tracks-mobx-warnings-c8wkwy
React 19.1.4 (no warnings): https://codesandbox.io/p/sandbox/component-performace-tracks-no-warnings-ttx7gt
The current behavior
Warnings logged since keys & values of component properties are enumerated in performance tracks, e.g.:
[mobx] Observable 'someProp' being read outside a reactive context.
The expected behavior
No side effects -> no warnings.
Possible options:
Option 1: A way to disable component performance tracks
Option 2: No deep enumeration of property keys and values?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the React 19.2 component performance track behavior and reproduce the warning using the linked MobX CodeSandbox examples. Compare the 19.2.3 and 19.1.4 cases, then determine whether disabling the tracks or avoiding deep property enumeration best prevents side effects. Done means the reproduction emits no MobX warnings while the intended performance tracking remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100