Skip to content

[compiler] Fixture to show ref-in-render enforcement issue with useCallback - #30714

Merged
mvitousek merged 5 commits into
gh/mvitousek/26/basefrom
gh/mvitousek/26/head
Aug 16, 2024
Merged

mvitousek merged 5 commits into
gh/mvitousek/26/basefrom
gh/mvitousek/26/head

Conversation

@mvitousek

@mvitousek mvitousek commented Aug 15, 2024 •

Copy link
Copy Markdown
Contributor

…llback

Test Plan:
Documents that useCallback calls interfere with it being ok for refs to escape as part of functions into jsx

[ghstack-poisoned]
@vercel

vercel Bot commented Aug 15, 2024 •

Copy link
Copy Markdown

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 Aug 16, 2024 5:16pm

… with useCallback"

Test Plan:
Documents that useCallback calls interfere with it being ok for refs to escape as part of functions into jsx

[ghstack-poisoned]

@josephsavona josephsavona left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this case is interesting. we don't know when the prop will be called, so we probably should be permissive and allow it since the callback could be called during an event/effect

… with useCallback"

Test Plan:
Documents that useCallback calls interfere with it being ok for refs to escape as part of functions into jsx

[ghstack-poisoned]
… with useCallback"

Test Plan:
Documents that useCallback calls interfere with it being ok for refs to escape as part of functions into jsx

[ghstack-poisoned]
… with useCallback"

Test Plan:
Documents that useCallback calls interfere with it being ok for refs to escape as part of functions into jsx

[ghstack-poisoned]
@mvitousek
mvitousek merged commit 3960990 into gh/mvitousek/26/base Aug 16, 2024
mvitousek added a commit that referenced this pull request Aug 16, 2024
…llback

Test Plan:
Documents that useCallback calls interfere with it being ok for refs to escape as part of functions into jsx

ghstack-source-id: a5df427
Pull Request resolved: #30714
@mvitousek
mvitousek deleted the gh/mvitousek/26/head branch August 16, 2024 17:28
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
…llback

Test Plan:
Documents that useCallback calls interfere with it being ok for refs to escape as part of functions into jsx

ghstack-source-id: a5df427
Pull Request resolved: react#30714

This branch was successfully deployed

1 active deployment
Preview — 39609907 Deployed Aug 16, 2024 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants