2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-20 08:40:34 +03:00

chore: spell & consistency check

This commit is contained in:
pimlie
2019-03-11 12:29:04 +01:00
parent 8024012cf9
commit de68dfcaab
9 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
# Any performance considarations?
# Any performance considerations?
Short answer, no
On the client, `vue-meta` batches DOM updates using [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame). It needs to do this because it registers a Vue mixin that subscribes to the [`beforeMount`](https://vuejs.org/api/#beforeMount) lifecycle hook on all components in order to be notified that renders have occurred and data is ready. If `vue-meta` did not batch updates, the DOM meta info would be re-calculated and re-updated for every component on the page in quick-succession.
On the client, `vue-meta` batches DOM updates using [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame). It needs to do this because it registers a Vue mixin that subscribes to the [`beforeMount`](https://vuejs.org/api/#beforeMount) lifecycle hook on all components in order to be notified that renders have occurred and data is ready. If `vue-meta` did not batch updates, the DOM metadata would be re-calculated and re-updated for every component on the page in quick-succession.
Thanks to batch updating, the update will only occurr once - even if the correct meta info has already been compiled by the server. If you don't want this behaviour, see below.
@@ -11,6 +11,6 @@ Previous versions of vue-meta injected lifecycle hooks from the global mixin on
Since v2.0 runtime performance should be improved due to:
- the global mixin injects just a `beforeCreate` lifecycle hook, other hooks are only added for components which define `metaInfo`
- we track component branches with `vue-meta` components which means that when refreshing metadata we can skip branches without metaInfo
- we track component branches with `vue-meta` components which means that when refreshing metadata we can skip branches without `metaInfo`
:::