Skip to content

feat: computed getter support#110

Merged
harlan-zw merged 16 commits intomainfrom
feat/getter-function-support
Oct 1, 2022
Merged

feat: computed getter support#110
harlan-zw merged 16 commits intomainfrom
feat/getter-function-support

Conversation

@harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Oct 1, 2022

(original PR)

Issue

#96, fixes #57

Solution

There are two fundamental changes to the logic:

  1. Take input as is and don't wrap it in anything (ref, shallowRef, etc)
  2. Resolve reactivity deeply, once, before it's rendered as a string or to DOM nodes

While this shouldn't break anything and the tests are passing, reactivity issues could potentially pop up. Will be introduced as a minor bump.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2022

Export Size

@vueuse/head

Name Size Diff
resolveHeadInput 199 B +199 B (+100.00%) 🔺
stringifyAttrValue 101 B +16 B (+18.82%) 🔺
isEqualNode 183 B +26 B (+16.56%) 🔺
stringifyAttrName 109 B +14 B (+14.74%) 🔺
injectHead 162 B +16 B (+10.96%) 🔺
createHead 1.84 KB +99 B (+5.53%) 🔺
stringifyAttrs 260 B +12 B (+4.84%) 🔺
setAttrs 219 B +10 B (+4.78%) 🔺
tagDedupeKey 276 B +12 B (+4.55%) 🔺
sortTags 185 B +8 B (+4.52%) 🔺
createElement 220 B +8 B (+3.77%) 🔺
tagToString 424 B +12 B (+2.91%) 🔺
Head 531 B +11 B (+2.12%) 🔺
updateElements 769 B +11 B (+1.45%) 🔺
renderHeadToString 741 B -9 B (-1.20%) 🔽
Unchanged

@vueuse/head

Name Size Diff
useHead 244 B -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dynamic data for title fetched by created()

1 participant