{"id":6731,"date":"2021-04-05T18:11:01","date_gmt":"2021-04-05T12:41:01","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=6731"},"modified":"2021-04-06T09:54:27","modified_gmt":"2021-04-06T04:24:27","slug":"vue-js-lifecycle","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/","title":{"rendered":"Vue js Lifecycle &#8211; Vue.js"},"content":{"rendered":"<h2><b>What is Vue js<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Vue js is a front-end JavaScript framework for building the user interface and single-page applications<\/span><\/p>\n<h2><b>Vue js lifecycle<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">lifecycle hooks are methods that give you the opportunity to add code at specific stages.<\/span><\/p>\n<p><strong>There are eight lifecycles in Vue js<\/strong><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\"> beforeCreate<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> created<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> beforeMount<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> mounted<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> beforeUpdate<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> Updated<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> BeforeDestroy<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> Destroyed<\/span><\/li>\n<\/ol>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-6749 \" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/image1-1.png\" alt=\"\" width=\"597\" height=\"335\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/image1-1.png 1024w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/image1-1-300x168.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/image1-1-768x431.png 768w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/image1-1-624x350.png 624w\" sizes=\"(max-width: 597px) 100vw, 597px\" \/><\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>\n<h3><b>beforeCrea<\/b><strong>te()<\/strong><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This is the primary lifecycle hook in vue, it&#8217;s referred to as once the Vue instance has been initialized. during this stage, events haven&#8217;t been established yet:<\/span><\/p>\n<pre class=\"lang:default decode:true\">&lt;script&gt;\r\n\r\nexport default {\r\n\r\n\u00a0\u00a0data() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0return {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0count: 0\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0},\r\n\r\n\u00a0\u00a0beforeCreate() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log('I am the first lifecychook to get called!');\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(`You can see that my data property is ${typeof this.count}`); \/\/ undefined\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<ol start=\"2\">\n<li>\n<h3><b>created<\/b><span style=\"font-weight: 400;\">()<\/span><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This is the second lifecycle hook that runs after beforeCreate() hooks. at this stage, Vue instance has been initialized and activated at the beginning of things like computed properties, watchers, events.<\/span><\/p>\n<pre class=\"lang:default decode:true\">&lt;script&gt;\r\n\r\nexport default {\r\n\r\n\u00a0\u00a0data() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0return {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0counter: 0\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0},\r\n\r\n\r\n\u00a0\u00a0created() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log('I am the created hook.');\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(`You can now see that my data property is ${typeof this.counter}`);\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<ol start=\"3\">\n<li>\n<h3><b>beforeMount<\/b><span style=\"font-weight: 400;\">()<\/span><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">beforeMount Method invoked right before the initial render happens<\/span><span style=\"font-weight: 400;\">. at this stage template or render functions have been compiled:<\/span><\/p>\n<pre class=\"lang:default decode:true \">&lt;script&gt;\r\n\r\nexport default {\r\n\r\n\u00a0\u00a0beforeMount() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log('I am ready to be rendered.!')\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<ol start=\"4\">\n<li>\n<h3><b>mounted()<\/b><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">In the mounted hook, you&#8217;ll have full access to the reactive part and the el(the DOM) has been replaced.\u00a0\u00a0<\/span><\/p>\n<pre class=\"lang:default decode:true\">&lt;template&gt;\r\n\r\n\u00a0\u00a0&lt;div ref=\"mounted-element\"&gt;component.&lt;\/div&gt;\r\n\r\n&lt;\/template&gt;\r\n\r\n\r\n&lt;script&gt;\r\n\r\nexport default {\r\n\r\n\u00a0\u00a0mounted() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(`At this point, vm.$el has been created and el has been replaced.`);\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<ol start=\"5\">\n<li>\n<h3><b>beforeUpdate<\/b><span style=\"font-weight: 400;\">()<\/span><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This method is called when data property updates and before the DOM has been re-rendered.<\/span><\/p>\n<pre class=\"lang:default decode:true\">&lt;script&gt;\r\n\r\nexport default {\r\n\r\n\u00a0\u00a0data() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0return {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0count: 0\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0},\r\n\r\n\r\n\u00a0\u00a0beforeUpdate() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(this.count) \/\/ Logs the counter value every second, before the DOM updates.\r\n\r\n\u00a0\u00a0},\r\n\r\n\u00a0\u00a0created() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0setInterval(() =&gt; {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.count++\r\n\r\n\u00a0\u00a0\u00a0\u00a0}, 1000)\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<ol start=\"6\">\n<li>\n<h3><b>updated<\/b><span style=\"font-weight: 400;\">()<\/span><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This method called when data property changed in your component and DOM re-rendered<\/span><\/p>\n<pre class=\"lang:default decode:true \">&lt;template&gt;\r\n\r\n\u00a0\u00a0&lt;div ref=\"counter-element\"&gt;{{counter}}&lt;\/div&gt;\r\n\r\n&lt;\/template&gt;\r\n\r\n&lt;script&gt;\r\n\r\nexport default {\r\n\r\n\u00a0\u00a0data() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0return {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0count: 0\r\n\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0},\r\n\r\n\u00a0\u00a0created() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0setInterval(() =&gt; {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.count++\r\n\r\n\u00a0\u00a0\u00a0\u00a0}, 1000)\r\n\r\n\u00a0\u00a0},\r\n\r\n\u00a0\u00a0updated() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(`At this point, Virtual DOM has re-rendered and patched.`)\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(+this.$refs['counter-element'].textContent === this.count)\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<ol start=\"7\">\n<li>\n<h3><b>beforeDestroy<\/b><span style=\"font-weight: 400;\">()<\/span><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">beforeDestroy() Method is fired right before the Vue instance is destroyed.<\/span><\/p>\n<pre class=\"lang:default decode:true\">&lt;script&gt;\r\n\r\nexport default {\r\n\r\n\r\n\u00a0\u00a0beforeDestroy() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(`At this point, watchers, child components, and event listeners have not been teared down yet.`)\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<ol start=\"8\">\n<li>\n<h3><b>destroyed<\/b><span style=\"font-weight: 400;\">()<\/span><\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This method is called when a Vue instance has been destroyed.<\/span><\/p>\n<pre class=\"lang:default decode:true\">&lt;script&gt;\r\n\r\n\r\nexport default {\r\n\r\n\u00a0\u00a0destroyed() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(`At this point, watchers, child components, and event listeners have been destroyed.`)\r\n\r\n\u00a0\u00a0\u00a0\u00a0console.log(this)\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Vue js Vue js is a front-end JavaScript framework for building the user interface and single-page applications Vue js lifecycle lifecycle hooks are methods that give you the opportunity to add code at specific stages. There are eight lifecycles in Vue js beforeCreate created beforeMount mounted beforeUpdate Updated BeforeDestroy Destroyed &nbsp; beforeCreate() This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6740,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[604],"tags":[603,601,602],"class_list":["post-6731","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vue-js","tag-complete-guide-to-vue-lifecycle","tag-vue-js-lifecycle-hooks","tag-vue-js-series"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Complete Guide to Vue js Lifecycle Hooks - Vue.js<\/title>\n<meta name=\"description\" content=\"A component in Vuejs has a lifecycle which is being managed by Vue itself when it creates the component, mounts the component to the DOM.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Complete Guide to Vue js Lifecycle Hooks - Vue.js\" \/>\n<meta property=\"og:description\" content=\"A component in Vuejs has a lifecycle which is being managed by Vue itself when it creates the component, mounts the component to the DOM.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-05T12:41:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-06T04:24:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/Vue.js-Lifecycle.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"Vue js Lifecycle &#8211; Vue.js\",\"datePublished\":\"2021-04-05T12:41:01+00:00\",\"dateModified\":\"2021-04-06T04:24:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/\"},\"wordCount\":226,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Vue.js-Lifecycle.png\",\"keywords\":[\"Complete Guide to Vue Lifecycle\",\"Vue js Lifecycle hooks\",\"Vue.js Series\"],\"articleSection\":[\"Vue js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/\",\"name\":\"A Complete Guide to Vue js Lifecycle Hooks - Vue.js\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Vue.js-Lifecycle.png\",\"datePublished\":\"2021-04-05T12:41:01+00:00\",\"dateModified\":\"2021-04-06T04:24:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"description\":\"A component in Vuejs has a lifecycle which is being managed by Vue itself when it creates the component, mounts the component to the DOM.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Vue.js-Lifecycle.png\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/Vue.js-Lifecycle.png\",\"width\":960,\"height\":540,\"caption\":\"Vue.js Lifecycle\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/vue-js-lifecycle\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vue js Lifecycle &#8211; Vue.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Complete Guide to Vue js Lifecycle Hooks - Vue.js","description":"A component in Vuejs has a lifecycle which is being managed by Vue itself when it creates the component, mounts the component to the DOM.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/","og_locale":"en_US","og_type":"article","og_title":"A Complete Guide to Vue js Lifecycle Hooks - Vue.js","og_description":"A component in Vuejs has a lifecycle which is being managed by Vue itself when it creates the component, mounts the component to the DOM.","og_url":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/","og_site_name":"InnovationM - Blog","article_published_time":"2021-04-05T12:41:01+00:00","article_modified_time":"2021-04-06T04:24:27+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/Vue.js-Lifecycle.png","type":"image\/png"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"Vue js Lifecycle &#8211; Vue.js","datePublished":"2021-04-05T12:41:01+00:00","dateModified":"2021-04-06T04:24:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/"},"wordCount":226,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/Vue.js-Lifecycle.png","keywords":["Complete Guide to Vue Lifecycle","Vue js Lifecycle hooks","Vue.js Series"],"articleSection":["Vue js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/","url":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/","name":"A Complete Guide to Vue js Lifecycle Hooks - Vue.js","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/Vue.js-Lifecycle.png","datePublished":"2021-04-05T12:41:01+00:00","dateModified":"2021-04-06T04:24:27+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"description":"A component in Vuejs has a lifecycle which is being managed by Vue itself when it creates the component, mounts the component to the DOM.","breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/Vue.js-Lifecycle.png","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2021\/04\/Vue.js-Lifecycle.png","width":960,"height":540,"caption":"Vue.js Lifecycle"},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/vue-js-lifecycle\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Vue js Lifecycle &#8211; Vue.js"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/6731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=6731"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/6731\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/6740"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=6731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=6731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=6731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}