{"id":490509,"date":"2026-08-11T08:00:19","date_gmt":"2026-08-11T08:00:19","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=490509"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=490509","title":{"rendered":"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u0430: \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c Vue"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d95\/030\/89c\/d9503089c970d352c32c846740043529.png\" width=\"780\" height=\"440\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d95\/030\/89c\/d9503089c970d352c32c846740043529.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d95\/030\/89c\/d9503089c970d352c32c846740043529.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>Vue \u0441\u043d\u043e\u0432\u0430 \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0412\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Vapor \u2014 \u0440\u0435\u0436\u0438\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM. \u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: <em>\u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0436\u043d\u044f\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430, \u0437\u0430\u0447\u0435\u043c Vue \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0441\u043d\u043e\u0432\u0430 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430?<\/em><\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0442\u0432\u0435\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Vue \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u0440\u0443\u0433 \u0432 \u0441\u0432\u043e\u0451\u043c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438. \u0415\u0433\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0417\u0430\u0442\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043d\u043e\u0432\u0430 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u043a \u0442\u043e\u0447\u0435\u0447\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0437\u0440\u0435\u043b\u043e\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0438 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043e\u043f\u044b\u0442\u0430, \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e Vue \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c ref \u0438 .value, \u0447\u0435\u043c \u0435\u0433\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u043a\u0430\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 Vapor. \u0410 \u0435\u0449\u0451 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 Vue 2 \u043d\u0430 Vue 3 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u043c, \u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0441\u043a\u0430\u0447\u043e\u043a \u0443\u0436\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Vue \u0434\u043e Vapor \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0434\u0435\u043b\u0438\u043c \u044d\u0442\u0443 \u0438\u0434\u0435\u044e \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430.<\/p>\n<h3>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0435\u0448\u0430\u0442\u044c \u043b\u044e\u0431\u0430\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"javascript\">let price = 100let quantity = 2let total = price * quantity<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f <code>price<\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>total<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"javascript\">price = 120console.log(total) \/\/ \u0432\u0441\u0451 \u0435\u0449\u0451 200<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:<\/p>\n<ol>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0444\u0444\u0435\u043a\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">const targetMap = new WeakMap()let activeEffect = nullfunction track(target, key) {  if (!activeEffect)    return  let depsMap = targetMap.get(target)  if (!depsMap) {    depsMap = new Map()    targetMap.set(target, depsMap)  }  let effects = depsMap.get(key)  if (!effects) {    effects = new Set()    depsMap.set(key, effects)  }  effects.add(activeEffect)}function trigger(target, key) {  const depsMap = targetMap.get(target)  const effects = depsMap?.get(key)  effects?.forEach(effect =&gt; effect())}function reactive(target) {  return new Proxy(target, {    get(target, key, receiver) {      track(target, key)      return Reflect.get(target, key, receiver)    },    set(target, key, value, receiver) {      const oldValue = target[key]      const result = Reflect.set(target, key, value, receiver)      if (!Object.is(oldValue, value))        trigger(target, key)      return result    },  })}function effect(fn) {  const reactiveEffect = () =&gt; {    activeEffect = reactiveEffect    try {      fn()    }    finally {      activeEffect = null    }  }  reactiveEffect()}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442:<\/p>\n<pre><code class=\"javascript\">const state = reactive({  price: 100,  quantity: 2,})effect(() =&gt; {  console.log(state.price * state.quantity)})\/\/ 200state.price = 120\/\/ 240<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f effect \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0438\u0442\u0430\u0435\u0442 price \u0438 quantity. \u041f\u0440\u043e\u043a\u0441\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 track, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 price \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f trigger, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442.<\/p>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 Vue \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0415\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u0449\u0438\u0442\u0443 \u043e\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0430\u0441\u0441\u0438\u0432\u044b, Map, Set \u0438 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0445\u0443\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u0439 \u0436\u0435:<\/p>\n<blockquote>\n<p><strong>\u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432.<\/strong><\/p>\n<\/blockquote>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 Proxy, \u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Vue \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u0439 \u0436\u0435 \u2014 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043e\u0442\u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435. Vue \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u0435\u0451 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 ES5, \u0441\u0432\u044f\u0437\u0430\u0432 \u0433\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0435\u0440\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u2014 \u0435\u0449\u0451 \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM.<\/p>\n<h3>Vue 1: \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Vue \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 2014 \u0433\u043e\u0434\u0443. \u0423\u0436\u0435 \u0432 \u0440\u0430\u043d\u043d\u0435\u0439 \u0432\u0435\u0442\u043a\u0435 <code>0.x<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438 \u0432\u043e Vue 1, \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0431\u044b\u043b <code>Object.defineProperty<\/code>.<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Vue \u043e\u0431\u0445\u043e\u0434\u0438\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u043b \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0433\u0435\u0442\u0442\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u0430\u043c\u0438:<\/p>\n<pre><code class=\"javascript\">function reactive(obj) {    const observed = {};    for (const key of Object.keys(obj)) {        let value = obj[key];        Object.defineProperty(observed, key, {            get() {                \/\/ \u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u043a\u0442\u043e \u0447\u0438\u0442\u0430\u0435\u0442                track(observed, key);                return value;            },            set(newValue) {                if (newValue === value) return;                value = newValue;                \/\/ \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u043c \u0432\u0441\u0435\u0445                trigger(observed, key);            }        });    }    return observed;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, Vue \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043b \u0435\u0433\u043e \u0441 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u0435\u043c. \u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0442\u0442\u0435\u0440 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b, \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0441\u044f trigger \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445.<\/p>\n<h4>\u0412\u0430\u0436\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c Vue 1<\/h4>\n<p>Vue 1 \u0435\u0449\u0451 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 DOM-\u0443\u0437\u043b\u0430\u043c\u0438. \u0423\u0441\u043b\u043e\u0432\u043d\u043e, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"xml\">&lt;span&gt;{{ message }}&lt;\/span&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u043d\u0430\u043b\u0430, \u043a\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 <code>message<\/code>.<\/p>\n<p>\u0412 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u044d\u0442\u043e \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u043b\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e DOM-\u0443\u0437\u043b\u0430.<\/p>\n<h4>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u043d\u043d\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430<\/h4>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Vue \u043c\u043e\u0433 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0432\u0448\u0438\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">const data = {\u00a0\u00a0user: {\u00a0\u00a0\u00a0\u00a0name: 'Ada',\u00a0\u00a0},}\/\/ \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 age \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438data.user.age = 37<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u043e\u0432\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0442\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 <code>$add<\/code>, <code>$set<\/code> \u0438 <code>$delete<\/code>.<\/p>\n<p>\u0423 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0431\u044b\u043b\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u043b\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435;<\/p>\n<\/li>\n<li>\n<p><code>Object.defineProperty<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0438\u0444\u0438\u043b\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044d\u0442\u043e \u0431\u044b\u043b \u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441. Vue \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 JavaScript-\u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0445 \u0441 DOM \u2014 \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430.<\/p>\n<h3>Vue 2: \u0442\u0430 \u0436\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0434\u0440\u0443\u0433\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430<\/h3>\n<p>Vue 2 \u0432\u044b\u0448\u0435\u043b \u0432 2016 \u0433\u043e\u0434\u0443. \u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0441\u0442\u0440\u043e\u0438\u043b\u0430\u0441\u044c \u043d\u0430 <code>Object.defineProperty<\/code>, \u043e\u0434\u043d\u0430\u043a\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c: \u0432 Vue \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM.<\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u0441\u0442\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 render-\u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"javascript\">function render() {  return h('div', this.message)}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f render <code>watcher<\/code>. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f render-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u0432\u0441\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, watcher \u0441\u0442\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e Vue \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u043d\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b \u0435\u0433\u043e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 DOM.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0442\u0430\u043a:<\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f render watcher. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f render-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u0432\u0441\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, watcher \u0441\u0442\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e Vue \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u043d\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b \u0435\u0433\u043e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 DOM.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb3\/f1f\/6ff\/bb3f1f6ff56c19e82d76428791233311.png\" width=\"424\" height=\"1300\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bb3\/f1f\/6ff\/bb3f1f6ff56c19e82d76428791233311.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb3\/f1f\/6ff\/bb3f1f6ff56c19e82d76428791233311.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u0427\u0442\u043e \u0434\u0430\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u043c\u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043d\u043e \u0438 \u0434\u0430\u043b Vue \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 render-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 JSX;<\/p>\n<\/li>\n<li>\n<p>\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u044b\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 renderer-\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0431\u043e\u043b\u0435\u0435 \u0447\u0451\u0442\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>Vue 2 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0431\u043e\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0430 \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u043a DOM.<\/p>\n<h4>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/h4>\n<p>Vue 2 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. Watcher \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0441\u044f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u0440\u0438\u0447\u0451\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c:<\/p>\n<pre><code class=\"javascript\">this.count++this.count++this.count++<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e \u0442\u0440\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0438. Vue \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u0438\u0445 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0446\u0438\u043a\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u041e\u0442\u0441\u044e\u0434\u0430 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 API:<\/p>\n<pre><code class=\"javascript\">await Vue.nextTick()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u041f\u043b\u044e\u0441\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Vue 2<\/h4>\n<ul>\n<li>\n<p>\u0437\u0440\u0435\u043b\u0430\u044f \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0431\u043e\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438, JSX \u0438 SSR.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041c\u0438\u043d\u0443\u0441\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Vue 2<\/h4>\n<p>\u0424\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f Object.defineProperty \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u0438.<\/p>\n<p>Vue \u043d\u0435 \u043c\u043e\u0433 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<pre><code class=\"javascript\">this.user.age = 37<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">this.$set(this.user, 'age', 37)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<pre><code class=\"javascript\">this.items[1] = newItem\/\/ this.items.length = 0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c <code>Vue.set<\/code> \u0438\u043b\u0438 <code>splice<\/code>.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>Map, Set, WeakMap \u0438 WeakSet \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 Vue 2 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u0441\u0451 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>Vue 2 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c, \u043d\u043e \u0435\u0433\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430, \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 ES5.<\/p>\n<h3>Vue 3: \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451<\/h3>\n<p>Vue 3 \u0432\u044b\u0448\u0435\u043b \u0432 2020 \u0433\u043e\u0434\u0443 \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c, \u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u043e\u0432\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u043f\u043e\u0434 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c API. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0430 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u042d\u0442\u043e \u0434\u0430\u043b\u043e Vue \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0434\u043e\u0440\u043e\u0433\u043e\u0439. \u041f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u043e\u0449\u0443\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440: \u0434\u0430\u0436\u0435 \u0441\u043f\u0443\u0441\u0442\u044f \u0448\u0435\u0441\u0442\u044c \u043b\u0435\u0442 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0430 Vue 2, \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c 31 \u0434\u0435\u043a\u0430\u0431\u0440\u044f 2023 \u0433\u043e\u0434\u0430. \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043d\u043e \u0438 \u043d\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430, UI-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0438 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430.<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u043e\u043b\u044c \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e: \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Vue 2 \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<h4>\u041e\u0442 Object.defineProperty \u043a Proxy<\/h4>\n<p>\u041e\u0441\u043d\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 Vue 3 \u0441\u0442\u0430\u043b <code>Proxy<\/code>. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 Vue \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0446\u0435\u043b\u0438\u043a\u043e\u043c:<\/p>\n<pre><code class=\"javascript\">function reactive(target) {  return new Proxy(target, {    get(target, key, receiver) {      track(target, key)      return Reflect.get(target, key, receiver)    },    set(target, key, value, receiver) {      const result = Reflect.set(target, key, value, receiver)      trigger(target, key)      return result    },  })}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432, \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 <code>Map<\/code> \u0438 <code>Set<\/code>. \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 <code>Vue.set<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c:<\/p>\n<pre><code class=\"javascript\">const state = reactive({  user: {    name: 'Ada',  },})state.user.age = 37delete state.user.name<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 Vue 2. \u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c, \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, <code>watcher\u2019s<\/code>, <code>computed<\/code> \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, <code>Proxy<\/code> \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0438\u0444\u0438\u043b\u043b\u0438\u0442\u044c \u0434\u043b\u044f Internet Explorer.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0438: \u044f\u0434\u0440\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 TypeScript, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0430 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u0438\u043b\u0438 \u043e\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<h4>\u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h4>\n<p>\u0412\u043e Vue 3 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u043b\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u043b\u043e\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 Options API:<\/p>\n<pre><code class=\"javascript\">const price = ref(100)const quantity = ref(2)const total = computed(() =&gt; {\u00a0\u00a0return price.value * quantity.value})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 Composition API. \u041b\u043e\u0433\u0438\u043a\u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443, \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u0432 composables \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c Options API \u043d\u0435 \u0438\u0441\u0447\u0435\u0437 \u2014 \u0432 Vue 3 \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430.<\/p>\n<p><code>ref<\/code> \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432 <code>Proxy<\/code>. JavaScript \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<pre><code class=\"javascript\">let count = 0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 Vue \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<\/p>\n<pre><code class=\"javascript\">const count = ref(0)count.value++<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>.value<\/code> \u2014 \u044d\u0442\u043e \u0442\u043e\u0447\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 Vue \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c. \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 refs \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043c <code>.value <\/code>\u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"xml\">&lt;button @click=\"count++\"&gt;\u00a0\u00a0{{ count }}&lt;\/button&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a \u0432\u043e Vue 3 \u0441\u043b\u043e\u0436\u0438\u043b\u0430\u0441\u044c \u0435\u0434\u0438\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430: <code>reactive<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, <code>ref<\/code> \u2014 \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, <code>computed<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u043e\u0442 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0438 \u0441\u0442\u0430\u043b \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430.<\/p>\n<h3>Vue 3.4 \u0438 3.5: \u0442\u043e\u0447\u043d\u0435\u0435 \u0433\u0440\u0430\u0444, \u043c\u0435\u043d\u044c\u0448\u0435 \u043b\u0438\u0448\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 Vue 3 \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b: \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0433\u0440\u0430\u0444\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<h4>Vue 3.4: \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c computed<\/h4>\n<p>\u0414\u043e Vue 3.4 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 <code>computed<\/code> \u043c\u043e\u0433\u043b\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"javascript\">const count = ref(0)const isEven = computed(() =&gt; count.value % 2 === 0)watchEffect(() =&gt; {  console.log(isEven.value)})count.value = 2<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>count<\/code> \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u043d\u043e <code>isEven<\/code> \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0440\u0430\u0432\u0435\u043d true. \u0420\u0430\u043d\u044c\u0448\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043c\u043e\u0433 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e computed \u0441\u0447\u0438\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Vue 3.4 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f.<\/p>\n<p>\u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u0446\u0435\u043f\u043e\u0447\u0435\u043a:<\/p>\n<pre><code class=\"javascript\">state \u2192 computed A \u2192 computed B \u2192 component<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0435\u043c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0430, \u0442\u0435\u043c \u0434\u043e\u0440\u043e\u0436\u0435 \u043b\u043e\u0436\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u043d\u044c\u0448\u0435.<\/p>\n<p>Vue 3.4 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432.<\/p>\n<h4>Vue 3.5: \u043d\u043e\u0432\u0430\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/h4>\n<p>\u0412 Vue 3.5 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u0440\u0443\u043f\u043d\u044b\u0439 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u2014 \u0443\u0436\u0435 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Vue, \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u0430\u043b:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 <strong>56% \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438<\/strong> \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 56%<\/p>\n<\/li>\n<li>\n<p>\u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c\u0438 computed;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0448\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 SSR;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u0438 \u0440\u0430\u0437.<\/p>\n<\/li>\n<\/ul>\n<p>Vue 3.5 \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044e props:<\/p>\n<pre><code class=\"javascript\">&lt;script setup lang=\"ts\"&gt;const {  count = 0,  message = 'Hello',} = defineProps&lt;{  count?: number  message?: string}&gt;()&lt;\/script&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u043c JavaScript \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u0441 \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<pre><code class=\"javascript\">const state = reactive({ count: 0 })const { count } = state\/\/ count \u2014 \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u043e \u0432 <code>&lt;script setup&gt;<\/code> \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a count \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a props.count. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a Vue \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 runtime-\u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441 compile-time-\u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c.<\/p>\n<p>\u041a Vue 3.5 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b\u0430, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0438 \u043a\u0430\u043a\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u044f\u0442. \u041d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u0447\u0435\u0440\u0435\u0437 render-\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 Virtual DOM. \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: <em>\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0433\u0440\u0430\u0444\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e DOM \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0443\u0437\u0435\u043b? <\/em>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u044d\u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u2014 \u043f\u043e\u0434\u0445\u043e\u0434, \u043e\u0431\u0435\u0449\u0430\u0432\u0448\u0438\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h3>\u041e\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u044b<\/h3>\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0441\u0442\u0430\u043b\u0438 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u044b\u0445 \u0438\u0434\u0435\u0439 \u0432\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435. \u0418\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b Solid, \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 API \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 Preact, Angular \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445. \u041d\u0430 \u0444\u043e\u043d\u0435 \u0443\u0441\u0442\u0430\u043b\u043e\u0441\u0442\u0438 \u043e\u0442 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043e\u043a \u0438 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044d\u0442\u0430\u043f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432.<\/p>\n<p>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430: \u0441\u0438\u0433\u043d\u0430\u043b \u0445\u0440\u0430\u043d\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u043d\u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u044f\u0442. \u0427\u0442\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">const [count, setCount] = createSignal(0)createEffect(() =&gt; {  console.log(count())})setCount(1)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043d\u0430\u0434 DOM. \u0415\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043d\u043e\u043f\u043a\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442, \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0437\u0430\u043d\u043e\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e Vue \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u041d\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0435 \u043d\u043e\u0432\u044b. <code>ref<\/code>, <code>computed<\/code> \u0438 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<pre><code class=\"javascript\">const count = ref(0)const doubled = computed(() =&gt; count.value * 2)watchEffect(() =&gt; {  console.log(doubled.value)})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c <code>ref<\/code> \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c, <code>computed<\/code> \u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u043c, \u0430 <code>watchEffect<\/code> \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c. \u041a\u043e\u0433\u0434\u0430 \u044d\u0444\u0444\u0435\u043a\u0442 \u0447\u0438\u0442\u0430\u0435\u0442 <code>count.value<\/code>, Vue \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u041a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430 API:<\/p>\n<pre><code class=\"javascript\">\/\/ Vuecount.valuecount.value = 1\/\/ \u0421\u0438\u0433\u043d\u0430\u043b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435count()setCount(1)\/\/ \u0421\u0438\u0433\u043d\u0430\u043b \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435count.get()count.set(1)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u0442\u043e\u0447\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c, \u0447\u0442\u043e Vue \u0432\u0441\u043b\u0435\u0434 \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 \u0440\u0435\u0448\u0438\u043b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c. \u0421\u043a\u043e\u0440\u0435\u0435 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u044f \u0441\u0442\u0430\u043b\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0432\u043d\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 Vue.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0443\u0442 \u043d\u0430\u0434\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e <strong>\u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u2014 \u043d\u0435 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435<\/strong>.<\/p>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 Vue \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. \u041d\u043e \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c Vue 3 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f render-\u044d\u0444\u0444\u0435\u043a\u0442 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/25f\/921\/a3d\/25f921a3d164d34da085d7fc12ee81fc.png\" width=\"808\" height=\"820\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/25f\/921\/a3d\/25f921a3d164d34da085d7fc12ee81fc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/25f\/921\/a3d\/25f921a3d164d34da085d7fc12ee81fc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b, Vue \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c render-\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 Vue \u0443\u043c\u0435\u0435\u0442 \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0437\u043b\u044b \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u044a\u0451\u043c \u0442\u0430\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c.<\/p>\n<p>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u043a\u0440\u0443\u0433 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u0438\u0434\u0443\u0442 \u0434\u0430\u043b\u044c\u0448\u0435. \u041e\u043d\u0438 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u043c \u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 DOM-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fc1\/660\/b5c\/fc1660b5c655a491d0e43628db06107c.png\" width=\"808\" height=\"432\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fc1\/660\/b5c\/fc1660b5c655a491d0e43628db06107c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fc1\/660\/b5c\/fc1660b5c655a491d0e43628db06107c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/927\/6d0\/294\/9276d0294d0a9c66904eccda6df7dc57.png\" width=\"584\" height=\"488\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/927\/6d0\/294\/9276d0294d0a9c66904eccda6df7dc57.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/927\/6d0\/294\/9276d0294d0a9c66904eccda6df7dc57.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 Vue \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442, \u043d\u043e \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430. <code>ref<\/code> \u0443\u043c\u0435\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0441\u0442\u0440\u043e\u044f\u0449\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u0442\u0430\u043f \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u0438 Vue. \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0443\u0436\u043e\u0439 API \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u0415\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0442\u0435\u0441\u043d\u0435\u0435 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043d\u0430\u0434 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<p>\u0422\u0430\u043a \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>Vapor Mode<\/strong> \u2014 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 <code>ref<\/code>, <code>computed<\/code>, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b Vue, \u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM \u0438\u0437 \u043f\u0443\u0442\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 DOM-\u0443\u0437\u043b\u044b.<\/p>\n<h3>Vapor: \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM<\/h3>\n<p>Vapor Mode \u2014 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Vue, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 DOM \u0431\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c Vapor \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e81\/70f\/718\/e8170f718863f61a49649e161da9eb36.png\" width=\"584\" height=\"488\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e81\/70f\/718\/e8170f718863f61a49649e161da9eb36.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e81\/70f\/718\/e8170f718863f61a49649e161da9eb36.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0448\u0430\u0431\u043b\u043e\u043d:<\/p>\n<pre><code class=\"xml\">&lt;template&gt;\u00a0\u00a0&lt;button @click=\"count++\"&gt;\u00a0\u00a0\u00a0\u00a0Count: {{ count }}\u00a0\u00a0&lt;\/button&gt;&lt;\/template&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 3 \u0441\u0442\u0430\u0434\u0438\u0438:<\/p>\n<ol>\n<li>\n<p>\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u0443\u044e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0443\u0437\u043b\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f count, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442.<\/p>\n<p><em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e Vapor \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u043e\u0435\u0439 <\/em><a href=\"https:\/\/habr.com\/ru\/companies\/first\/articles\/856346\/\"><em>\u0441\u0442\u0430\u0442\u044c\u0435<\/em><\/a><em>.<\/em><\/p>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 Vue \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 Vapor \u0437\u0430\u043c\u044b\u043a\u0430\u0435\u0442 \u043a\u0440\u0443\u0433. Vue 1 \u0442\u043e\u0436\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043b \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 DOM-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438. \u041d\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 Vapor \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0435:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 <code>ref<\/code>, <code>reactive<\/code> \u0438 <code>computed<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 SFC;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>TypeScript;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 Vue 3;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c VDOM-\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0426\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043d\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 Solid \u0438\u043b\u0438 Svelte, \u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 Vue API \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0451\u0432\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0442\u0430\u043c, \u0433\u0434\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/h3>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0433\u043b\u0430\u0432\u0430 Vue \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043f\u0440\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443 API \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. <code>ref<\/code>, <code>reactive<\/code>, <code>computed<\/code> \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0437\u0440\u0435\u043b\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0442\u043e\u043c, <strong>\u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/strong>.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439.<\/p>\n<h4>1. \u0421\u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 VDOM \u0438 Vapor<\/h4>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442\u044c. \u041e\u043d \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f:<\/p>\n<ul>\n<li>\n<p>\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 render-\u0444\u0443\u043d\u043a\u0446\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>JSX;<\/p>\n<\/li>\n<li>\n<p>\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>Vapor \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 SFC-\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u0433\u0434\u0435 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u0435\u043d \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0439 Vue: \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430.<\/p>\n<h4>2. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u044b<\/h4>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443\u0436\u0435:<\/p>\n<ul>\n<li>\n<p>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0437\u043b\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 refs \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 props;<\/p>\n<\/li>\n<li>\n<p>\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f SSR \u0438 \u0433\u0438\u0434\u0440\u0430\u0442\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>Vapor \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442 \u0442\u0443 \u0436\u0435 \u0438\u0434\u0435\u044e: \u0435\u0441\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0435\u0451 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<h4>3. \u0413\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u043d\u0435\u0442 \u0432\u0430\u0436\u043d\u0435\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 UI-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u0443\u043c\u0430\u0435\u0442 \u0434\u0435\u0440\u0435\u0432\u043e\u043c:<\/p>\n<pre><code class=\"typescript\">\u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2192 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u2192 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438\u0441\u044c \u0435\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u0443\u0437\u043b\u044b<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0413\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u0443\u043c\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u043e\u043c: <\/p>\n<pre><code class=\"java\">\u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b \u2192 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0438 \u2192 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438\u0441\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 DOM-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>Vue, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>Vue 3 \u0443\u0436\u0435 \u0437\u0430\u043b\u043e\u0436\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Vapor \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 Vue 2 \u2192 Vue 3. \u0427\u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442?\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0430 Vue 2, \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 Vue 3 \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c. \u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430, \u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 Vue 3 \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u043d\u0430 Vue 3, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043a Vapor \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. <code>ref<\/code>, <code>reactive<\/code>, <code>computed<\/code> \u0438 SFC \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0438\u0441\u044c \u2014 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u043e DOM.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 API \u0438 \u043d\u0435 \u0437\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440\u0430. \u0422\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 Vue \u0432 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u0437\u044f\u0442\u044c \u043d\u0430 \u0441\u0435\u0431\u044f.<\/p>\n<hr\/>\n<p>\u041d\u041b\u041e \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u0433\u0430:<br \/><a href=\"https:\/\/firstvds.ru\/?utm%5C%5C_source=habr&amp;utm%5C%5C_medium=article&amp;utm%5C%5C_campaign=product&amp;utm%5C%5C_content=vds15exeptprogrev\">-15% \u043d\u0430 \u0437\u0430\u043a\u0430\u0437 \u043d\u043e\u0432\u043e\u0433\u043e VDS<\/a>\u00a0\u2014\u00a0<strong>HABRFIRSTVDS<\/strong>.<\/p>\n<p><a href=\"https:\/\/firstvds.ru\/habr15\">\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431 \u0430\u043a\u0446\u0438\u0438<\/a><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1069048\/\">https:\/\/habr.com\/ru\/articles\/1069048\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vue \u0441\u043d\u043e\u0432\u0430 \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0412\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Vapor \u2014 \u0440\u0435\u0436\u0438\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM. \u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0436\u043d\u044f\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430, \u0437\u0430\u0447\u0435\u043c Vue \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0441\u043d\u043e\u0432\u0430 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430?\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0442\u0432\u0435\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Vue \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u0440\u0443\u0433 \u0432 \u0441\u0432\u043e\u0451\u043c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438. \u0415\u0433\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0417\u0430\u0442\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043d\u043e\u0432\u0430 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u043a \u0442\u043e\u0447\u0435\u0447\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0437\u0440\u0435\u043b\u043e\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0438 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043e\u043f\u044b\u0442\u0430, \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442.\u042d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e Vue \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c ref \u0438 .value, \u0447\u0435\u043c \u0435\u0433\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u043a\u0430\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 Vapor. \u0410 \u0435\u0449\u0451 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 Vue 2 \u043d\u0430 Vue 3 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u043c, \u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0441\u043a\u0430\u0447\u043e\u043a \u0443\u0436\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Vue \u0434\u043e Vapor \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0434\u0435\u043b\u0438\u043c \u044d\u0442\u0443 \u0438\u0434\u0435\u044e \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430.\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0435\u0448\u0430\u0442\u044c \u043b\u044e\u0431\u0430\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430.\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:let price = 100let quantity = 2let total = price * quantity\u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f price \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f total \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f:price = 120console.log(total) \/\/ \u0432\u0441\u0451 \u0435\u0449\u0451 200\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;\u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0444\u0444\u0435\u043a\u0442;\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:const targetMap = new WeakMap()let activeEffect = nullfunction track(target, key) {  if (!activeEffect)    return  let depsMap = targetMap.get(target)  if (!depsMap) {    depsMap = new Map()    targetMap.set(target, depsMap)  }  let effects = depsMap.get(key)  if (!effects) {    effects = new Set()    depsMap.set(key, effects)  }  effects.add(activeEffect)}function trigger(target, key) {  const depsMap = targetMap.get(target)  const effects = depsMap?.get(key)  effects?.forEach(effect =&gt; effect())}function reactive(target) {  return new Proxy(target, {    get(target, key, receiver) {      track(target, key)      return Reflect.get(target, key, receiver)    },    set(target, key, value, receiver) {      const oldValue = target[key]      const result = Reflect.set(target, key, value, receiver)      if (!Object.is(oldValue, value))        trigger(target, key)      return result    },  })}function effect(fn) {  const reactiveEffect = () =&gt; {    activeEffect = reactiveEffect    try {      fn()    }    finally {      activeEffect = null    }  }  reactiveEffect()}\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442:const state = reactive({  price: 100,  quantity: 2,})effect(() =&gt; {  console.log(state.price * state.quantity)})\/\/ 200state.price = 120\/\/ 240\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f effect \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0438\u0442\u0430\u0435\u0442 price \u0438 quantity. \u041f\u0440\u043e\u043a\u0441\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 track, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 price \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f trigger, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442.\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 Vue \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0415\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c:\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b;\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438;\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439;\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c;\u0437\u0430\u0449\u0438\u0442\u0443 \u043e\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432;\u043c\u0430\u0441\u0441\u0438\u0432\u044b, Map, Set \u0438 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b;\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432;\u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0445\u0443\u043a\u0438.\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u0439 \u0436\u0435:\u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432.\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 Proxy, \u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Vue \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u0439 \u0436\u0435 \u2014 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043e\u0442\u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435. Vue \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u0435\u0451 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 ES5, \u0441\u0432\u044f\u0437\u0430\u0432 \u0433\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0435\u0440\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u2014 \u0435\u0449\u0451 \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM.Vue 1: \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM\u041f\u0435\u0440\u0432\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Vue \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 2014 \u0433\u043e\u0434\u0443. \u0423\u0436\u0435 \u0432 \u0440\u0430\u043d\u043d\u0435\u0439 \u0432\u0435\u0442\u043a\u0435 0.x, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438 \u0432\u043e Vue 1, \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0431\u044b\u043b Object.defineProperty.\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Vue \u043e\u0431\u0445\u043e\u0434\u0438\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u043b \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0433\u0435\u0442\u0442\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u0430\u043c\u0438:function reactive(obj) {    const observed = {};    for (const key of Object.keys(obj)) {        let value = obj[key];        Object.defineProperty(observed, key, {            get() {                \/\/ \u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u043a\u0442\u043e \u0447\u0438\u0442\u0430\u0435\u0442                track(observed, key);                return value;            },            set(newValue) {                if (newValue === value) return;                value = newValue;                \/\/ \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u043c \u0432\u0441\u0435\u0445                trigger(observed, key);            }        });    }    return observed;}\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, Vue \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043b \u0435\u0433\u043e \u0441 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u0435\u043c. \u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0442\u0442\u0435\u0440 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b, \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0441\u044f trigger \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445.\u0412\u0430\u0436\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c Vue 1Vue 1 \u0435\u0449\u0451 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 DOM-\u0443\u0437\u043b\u0430\u043c\u0438. \u0423\u0441\u043b\u043e\u0432\u043d\u043e, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:&lt;span&gt;{{ message }}&lt;\/span&gt;\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u043d\u0430\u043b\u0430, \u043a\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 message.\u0412 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u044d\u0442\u043e \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u043b\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e DOM-\u0443\u0437\u043b\u0430.\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u043d\u043d\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Vue \u043c\u043e\u0433 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0432\u0448\u0438\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430:const data = {\u00a0\u00a0user: {\u00a0\u00a0\u00a0\u00a0name: &#8216;Ada&#8217;,\u00a0\u00a0},}\/\/ \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 age \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438data.user.age = 37\u041d\u043e\u0432\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0442\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 $add, $set \u0438 $delete.\u0423 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0431\u044b\u043b\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438:\u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442;\u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438;\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c;\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u043b\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435;Object.defineProperty \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0438\u0444\u0438\u043b\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432.\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044d\u0442\u043e \u0431\u044b\u043b \u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441. Vue \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 JavaScript-\u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0445 \u0441 DOM \u2014 \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430.Vue 2: \u0442\u0430 \u0436\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0434\u0440\u0443\u0433\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430Vue 2 \u0432\u044b\u0448\u0435\u043b \u0432 2016 \u0433\u043e\u0434\u0443. \u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0441\u0442\u0440\u043e\u0438\u043b\u0430\u0441\u044c \u043d\u0430 Object.defineProperty, \u043e\u0434\u043d\u0430\u043a\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c: \u0432 Vue \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM.\u0428\u0430\u0431\u043b\u043e\u043d \u0441\u0442\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 render-\u0444\u0443\u043d\u043a\u0446\u0438\u044e:function render() {  return h(&#8216;div&#8217;, this.message)}\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f render watcher. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f render-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u0432\u0441\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, watcher \u0441\u0442\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433.\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e Vue \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u043d\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b \u0435\u0433\u043e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 DOM.\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0442\u0430\u043a:\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f render watcher. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f render-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u0432\u0441\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, watcher \u0441\u0442\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433.\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e Vue \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u043d\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b \u0435\u0433\u043e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 DOM.\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0442\u0430\u043a:\u0427\u0442\u043e \u0434\u0430\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u043c\u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043d\u043e \u0438 \u0434\u0430\u043b Vue \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439:\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 render-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 JSX;\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432;\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u044b\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438;\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 renderer-\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438;\u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438;\u0431\u043e\u043b\u0435\u0435 \u0447\u0451\u0442\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.Vue 2 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0431\u043e\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0430 \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u043a DOM.\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044cVue 2 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. Watcher \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0441\u044f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u0440\u0438\u0447\u0451\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c:this.count++this.count++this.count++\u042d\u0442\u043e \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e \u0442\u0440\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0438. Vue \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u0438\u0445 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0446\u0438\u043a\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u041e\u0442\u0441\u044e\u0434\u0430 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 API:await Vue.nextTick()\u041f\u043b\u044e\u0441\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Vue 2\u0437\u0440\u0435\u043b\u0430\u044f \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432;\u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c;\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0431\u043e\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439;\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439;\u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439;\u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438, JSX \u0438 SSR.\u041c\u0438\u043d\u0443\u0441\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Vue 2\u0424\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f Object.defineProperty \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u0438.Vue \u043d\u0435 \u043c\u043e\u0433 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:this.user.age = 37\u041f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:this.$set(this.user, &#8216;age&#8217;, 37)\u0421 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:this.items[1] = newItem\/\/ this.items.length = 0\u0414\u043b\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c Vue.set \u0438\u043b\u0438 splice.\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e:\u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;Map, Set, WeakMap \u0438 WeakSet \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438;\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430;\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 Vue 2 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u0441\u0451 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439.Vue 2 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c, \u043d\u043e \u0435\u0433\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430, \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 ES5.Vue 3: \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451Vue 3 \u0432\u044b\u0448\u0435\u043b \u0432 2020 \u0433\u043e\u0434\u0443 \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c, \u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u043e\u0432\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u043f\u043e\u0434 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c API. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0430 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.\u042d\u0442\u043e \u0434\u0430\u043b\u043e Vue \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0434\u043e\u0440\u043e\u0433\u043e\u0439. \u041f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u043e\u0449\u0443\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440: \u0434\u0430\u0436\u0435 \u0441\u043f\u0443\u0441\u0442\u044f \u0448\u0435\u0441\u0442\u044c \u043b\u0435\u0442 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0430 Vue 2,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-490509","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/490509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=490509"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/490509\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=490509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=490509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=490509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}