-
Notifications
You must be signed in to change notification settings - Fork 114
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
Update samples to use a computed variable for head #225
Conversation
pages/composition-api.vue
Outdated
title: 'Composition API Demo', | ||
meta: [{ | ||
name: 'message', | ||
content: message.value // It's not reactive | ||
}] | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmsk Sorry for the delay in replying. I'm afraid this isn't actually that intuitive at the moment. I might need to add the functionality to @nuxtjs/composition-api
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this API look good to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense for me. useMeta(() => ({}))
is intuitive and looks similar to the type of head
/ head()
in options/class API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a812357 😉
* use like `useMeta(() => ({ title: message.value }))` for computed head * nuxt-community/typescript-template#225 * closes #254
@hmsk my proposed api should now be useable in |
Thanks, @danielroe for your responsive updates on |
useMeta
(looks not supported yet)