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] repro for reactive ref.current accesses #31519

Merged
merged 1 commit into from
Nov 12, 2024
Merged

[compiler] repro for reactive ref.current accesses #31519

merged 1 commit into from
Nov 12, 2024

Conversation

mofeiZ
Copy link
Contributor

@mofeiZ mofeiZ commented Nov 12, 2024

Copy link

vercel bot commented Nov 12, 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 Nov 12, 2024 6:36pm

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Nov 12, 2024
@jbrown215
Copy link
Contributor

jbrown215 commented Nov 12, 2024

Is it the case that ref.current is reactive? I think the reason ref is reactive in your test case is because ref is derived from a reactive cond, but not because ref1, ref2, or either current field is reactive?

@mofeiZ
Copy link
Contributor Author

mofeiZ commented Nov 12, 2024

Is it the case that ref.current is reactive? I think the reason ref is reactive in your test case is because ref is derived from a reactive cond, but not because ref1, ref2, or either current field is reactive?

Yep, sorry for the confusing PR title! Happy to change it 😅 The bug is technically only related to ref.current (see next PR for the offending line in propagateScopeDeps), but you're definitely correct -- we shouldn't be reactive on ref.current

@mofeiZ mofeiZ merged commit 3770c11 into main Nov 12, 2024
19 checks passed
@poteto poteto deleted the pr31519 branch November 18, 2024 15:18
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.

4 participants