Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Aug 16, 2024

Conversation

…llback

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

[ghstack-poisoned]
Copy link

vercel bot commented Aug 15, 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 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]
Copy link
Contributor

@josephsavona josephsavona left a comment

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
19 checks passed
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: a5df427981ca32406fb2325e583b64bbe26b1cdd
Pull Request resolved: #30714
@mvitousek mvitousek deleted the gh/mvitousek/26/head branch August 16, 2024 17:28
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