question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename `useMeta` to `useHead`

See original GitHub issue

@Atinux One issue is that useMeta shall be renamed to useHead from my POV (to be consistent with Nuxt 2 as well and avoid confusion with router meta)

Renaming meta to head, can make API consistent and familiar with Nuxt 2 and less chance of confusing with arbitrary meta definitions such as (more importantly) definePageMeta.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

6reactions
Atinuxcommented, Apr 4, 2022

I believe we can keep useMeta as an alias + display a warning about migrating to useHead and useMeta will be removed for Nuxt 3 stable version.

1reaction
Atinuxcommented, Apr 5, 2022

Updating the issue, I think the shortcuts should reflect the current html tag, useMetaDescription still makes sense.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Update Page Title and Metadata with Vue.js and vue ...
In this tutorial, you learned how to use meta fields and navigation guards to update the page title and metadata on route change....
Read more >
Meta Tags - Migrate to Nuxt 3
In your nuxt.config , rename head to meta . ... If you need to access the component state with head , you should...
Read more >
useMeta not updating title in Nuxt Composition API
I tried this, doesn't seem to work. I'm able to log the title and meta values but it's not updating in the browser....
Read more >
@nuxtjs/composition-api | Yarn - Package Manager
useHead () no longer exists and instead useMeta can be used directly within setup , as long as a minimal head: {} is...
Read more >
Changelog | Nuxt Color Mode
... fix: rename useMeta to useHead by @Intevel in #135 ... importing color mode configuration types, note that this has been renamed to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found