Created or Mounted? Explanation of Lifecycle Hooks in VueJs

Nika Kharebava
4 min readAug 1, 2022

If you have just started to learn VueJs or you are already a little bit familiar with its structure, you might have heard about the lifecycle hooks. But how can we use them and what is their meaning? Let me explain to you.

If you reading this article, that means that you already have some basic knowledge of JavaScript and you are into learning a framework. I hope this is the case because it wouldn’t be a good idea to skip a JavaScript course before jumping into a framework.

In this article, we will talk about how actually can we understand lifecycles in VueJs and how we can probably use them.

First of all, if you want to understand well the lifecycles meaning, you have to know what DOM is.

What are the lifecycles?

Well, the name of it talks for itself.

Let’s take a simple example and imagine a simple HTML page and take a look at its “life”.

First, when we open the website, the page has been created (its domain and all its inner structure). Then, its elements appear (all the divs, paragraphs, and actually anything we see on the page).

The page can be updated as well, we can change something on it, add a file or fill out a form. The page can be also…

--

--

Nika Kharebava

Front-end developer specialized in Vue.Js framework. Writing about web development, side hustles, and motivation. 🌟