-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
fix(reactivity): readonly ref able to trigger by triggerRef
#12804
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
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
This reverts commit fafbea7.
/ecosystem-ci run |
LGTM |
triggerRef
triggerRef
📝 Ran ecosystem CI: Open
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using __v_skip
looks like a good approach to me.
The test is outside the describe
section, it should probably be moved inside.
The PR description also needs updating to reflect the latest code.
Co-authored-by: skirtle <[email protected]>
WalkthroughA new test case was added to the readonly reactivity test suite to verify that effects can be manually triggered on a readonly shallowRef using Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Case
participant Ref as shallowRef (original)
participant Readonly as readonly(shallowRef)
participant Effect as Effect
Test->>Ref: Create shallowRef({ n: 1 })
Test->>Readonly: Wrap with readonly
Test->>Effect: Setup effect tracking Readonly.value.n
Test->>Ref: Mutate Ref.value.n++
Effect-->>Test: No update triggered
Test->>Readonly: triggerRef(Readonly)
Effect-->>Test: Effect re-runs and observes updated value
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Fix #12803
This PR adds
dep
toisNonTrackableKeys
so that the readonly proxy does not convertdep
to a readonly value, allowing it to be triggered bytriggerRef
.Summary by CodeRabbit
Tests
Chores