-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Description
Vue version
3.3.0-alpha.6
3.3.0-alpha.7
Link to minimal reproduction
Steps to reproduce
Open reproduction url and select vue version 3.3.0-alpha.6 or alpha.7 (for some reason SFC Playground doesn't remember the selected version)
What is expected?
Should compile vue component without error since all code is valid.
What is actually happening?
Compiler throws an error:
Error: [@vue/compiler-sfc] "error" is a destructured prop and cannot be directly watched. Use a getter () => error instead.
App.vue
13 | const { error } = useRequest();
14 |
15 | watch(error, () => {
| ^^^^^
16 |
17 | });
But if you remove const { userId } = defineProps({ userId: Number })
then the error is gone.
Metadata
Metadata
Assignees
Labels
No labels