Open
Description
Hi,
I get a weird warning about resource
props, I thought because optional props are not required in this example since we've provided a default
value and we're using the NotFound
component in the path: /:catchAll(.*)
, so I set required
to false
in order to get rid of this warning:
main.js?t=1699883629605:10
[Vue warn]: Missing required prop: "resource"
at <NotFound onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > >
at <RouterView>
at <App>
Here is the change I made:
import { defineProps } from "vue";
defineProps({
resource: {
type: String,
required: false, // <-- This has to be false?
default: "page",
},
});
Here are my versions:
"dependencies": {
"axios": "^1.6.1",
"pinia": "^2.1.7",
"vue": "^3.3.8",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.4.1",
"vite": "^4.5.0"
}
Metadata
Assignees
Labels
No labels
Activity