I currently have:

async asyncData({ store, route }) {
  const postMeta = await store.dispatch('modules/post/get', route.params.id)
  return {
head() {
  // const something = this.$store.getters['modules/post'] // <------- this.$store
  return {
    title: this.postMeta.title,
    meta: [
      { hid: 'og:image', name: 'og:image', content: this.postMeta.mainImage },
      { hid: 'og:description', name: 'og:description', content: this.postMeta.description },
      { hid: 'og:description', name: 'og:description', content: this.postMeta.swapProps }

it doesn't work. I've tried pretty much all ways imaginable with the docs on the interwebs. fetch no. explicitly setting "SocialHead" component in parent, etc. Many etc's here.

Error on client is currently saying "title" undefined.

The dispatch action sets my post on client and server (asyncData). Should these be different commits??

At a loss.

Thanks for insight.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.