We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://stackblitz.com/edit/github-k5deut?file=src%2Fstores%2Fcart.ts,src%2FApp.vue,src%2Fstores%2Fuser.ts
Open src/stores/cart.ts Change
test(state) { return state.totalNum + 1005; }
Check log
const cart = useCartStore(); const { test } = storeToRefs(cart); const testStoreToRefs = storeToRefs(cart) watchEffect(() => { console.log( cart.test, test.value, testStoreToRefs.test.value, storeToRefs(cart).test.value, storeToRefs(cart).test ); });
when use
const { test } = storeToRefs(cart); const testStoreToRefs = storeToRefs(cart)
change file src/stores/cart.ts, HMR should work as cart.test(or storeToRefs(cart).test.value or storeToRefs(cart).test)
change file src/stores/cart.ts, HMR not work as expected
No response
The text was updated successfully, but these errors were encountered:
fix: vuejs#2779 add test
f7f1e42
Successfully merging a pull request may close this issue.
Reproduction
https://stackblitz.com/edit/github-k5deut?file=src%2Fstores%2Fcart.ts,src%2FApp.vue,src%2Fstores%2Fuser.ts
Steps to reproduce the bug
Open src/stores/cart.ts
Change
Check log
Expected behavior
when use
change file src/stores/cart.ts, HMR should work as cart.test(or storeToRefs(cart).test.value or storeToRefs(cart).test)
Actual behavior
when use
change file src/stores/cart.ts, HMR not work as expected
Additional information
No response
The text was updated successfully, but these errors were encountered: