Level 17
According to the documentation, you should pass the props to setup and use props.member.id instead of this.member.id; https://vuejs.org/api/composition-api-setup.html#accessing-props
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Member is undefined even when I have it in my props and it works fine in the template.
props: {
member: Object,
sponsor: '',
},
setup () {
const form = useForm({
email: null,
name: null,
relationship: '',
address: '',
gender: '',
// This line returns member is undefined.
member_id: this.member.id,
mobile: '',
})
return { form }
},
According to the documentation, you should pass the props to setup and use props.member.id instead of this.member.id; https://vuejs.org/api/composition-api-setup.html#accessing-props
Please or to participate in this conversation.