-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
[v3.5.x] destructure from defineProps
with withDefaults
throw an error
#11930
Comments
Can I ask, why is it unnecessary when using destructure with defineProps? How do you pass defaults in this case then? |
const { foo = 1 } = defineProps(…) |
But then they are still reactive right? If my understanding is correct there is some magic normally happening when using I'm asking because now in the error message in question there is also |
It means |
… desutructure close vuejs#11930
Vue version
3.5.5
Link to minimal reproduction
https://play.vuejs.org/#eNp9kctOwzAQRX9l8CatVFohWFVpEY9KwAIqQGLjTZROUhfHtuxJWynKvzNx1McCdeXM3DvxuZ5GPDg33tYopiINuVeOICDVDnRmypkUFKSYS6MqZz1BAx4LaKHwtoKExxJppMmtCQRVKGHW6YPkBbW28GO9Xl0lw5OlAUI+WvbtFK2fschqTWGwwkIZXHrrQtpIA9F2P4VAXplSmnY+GI7gqEwh6Q6+u+Wfp5Oemym5IKyczgi5AkjXN/OmiWRtm064il1lXE2wva7sCjVnZF0KmLCYTs7mxYjTM3ihyvEmWMNPFBGkyG3llEb/4UhxMCmmPVynZRx99xZ75GscHfr5GvPff/qbsO96Uiw9BvRblOKoUeZLpF5efL3jnr+PItPXmt0XxE8MVtcdY297rM2Ksc98kfY1Lpdf+jss9oQmHEJ1oJ2zjX4peOFPF6KfcG/Hd3GONyTaP1bly/I=
Steps to reproduce
create new project
// App.vue
throw error:
What is expected?
It should not throw an error and shoule not break build, just keep it warning,
Or, if
withDefaults
not marked asdeprecated
, it should work without any warn or error messagesWhat is actually happening?
It breaks build
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: