Skip to content

getActiveHead vs injectHead (Vue) #362

Answered by harlan-zw
yooouuri asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, thanks for the discussion.

If you're using Vue, you should always use @unhead/vue functions over unhead functions. While using getActiveHead() does work, it returns shared cross-request instance of unhead, where injectHead() is bound to the Vue context.

This will likely break in v2 so better to stick to injectHead().

I'll leave this open as a reminder to improve the docs around this.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yooouuri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants