Skip to content

Conversation

gsathya
Copy link
Contributor

@gsathya gsathya commented Jul 25, 2024

Stack from ghstack (oldest at bottom):

If a function expression that mutates a global is passed as a prop,
we don't throw an error as we assume it's not called in render.

But if this function expression is captured in an object and passed down
as prop, we throw an error.

If a function expression that mutates a global is passed as a prop,
we don't throw an error as we assume it's not called in render.

But if this function expression is captured in an object and passed down
as prop, we throw an error.

[ghstack-poisoned]
Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 1:08pm

If a function expression that mutates a global is passed as a prop,
we don't throw an error as we assume it's not called in render.

But if this function expression is captured in an object and passed down
as prop, we throw an error.

[ghstack-poisoned]
@gsathya gsathya merged commit 6195997 into gh/gsathya/7/base Jul 25, 2024
gsathya added a commit that referenced this pull request Jul 25, 2024
If a function expression that mutates a global is passed as a prop,
we don't throw an error as we assume it's not called in render.

But if this function expression is captured in an object and passed down
as prop, we throw an error.

ghstack-source-id: 74cacee
Pull Request resolved: #30456
@gsathya gsathya deleted the gh/gsathya/7/head branch July 25, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants