Skip to content

[pull] main from facebook:main#329

Merged
pull[bot] merged 2 commits into
LoadsAForks:mainfrom
react:main
Nov 20, 2025
Merged

[pull] main from facebook:main#329
pull[bot] merged 2 commits into
LoadsAForks:mainfrom
react:main

Conversation

@pull

@pull pull Bot commented Nov 20, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…sions on no-derived-computation-in-effects (#35173)

Summary:
The operands of a function expression are the elements passed as
context. This means that it doesn't make sense to record mutations for
them.

The relevant mutations will happen in the function body, so we need to
prevent FunctionExpression type instruction from running the logic for
effect mutations.

This was also causing some values to depend on themselves in some cases
triggering an infinite loop. Also added n invariant to prevent this
issue

Test Plan:
Added fixture test

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35173).
* #35174
* __->__ #35173
…ns-in-effects (#35174)

Summary:
I missed this conditional messing things up for undefined useState()
calls. We should be tracking them.

I also missed a test that expect an error was not throwing.

Test Plan:
Update broken test

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35174).
* __->__ #35174
* #35173
@pull pull Bot locked and limited conversation to collaborators Nov 20, 2025
@pull pull Bot added the ⤵️ pull label Nov 20, 2025
@pull
pull Bot merged commit 7d67591 into LoadsAForks:main Nov 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant