How to use async data in metaInfo?

vue-meta will do this for you automatically when your component state changes.

Just make sure that you're using the function form of metaInfo:

  1. {
  2. data () {
  3. return {
  4. title: 'Foo Bar Baz'
  5. }
  6. },
  7. metaInfo () {
  8. return {
  9. title: this.title
  10. }
  11. }
  12. }

Check out the vuex-asyncHow to use async data in metaInfo? - 图1 example for a more detailed demonstration