Posts for Vue

Deven
Deven wrote

Vue export default vs Vue new

In this article, you will learn about the difference between Vue export default and Vue new. Vue is a progressive JavaScript framework used to build web interfaces and one-page applications. To work with Vue you need to declare it. Let’s see the ways of declaring it: Using Vue new: You can create a Vue instance […]

December 15, 2021 in Code examples
Deven
Deven wrote

Learn How to install Vue by using CDN

In this article, you are going to learn about how to install Vue by using CDN. Vue is a lightweight front-end JavaScript framework that is widely used for building Single Page Applications. To work with Vue, you can install it in many ways, Using CDN(Content Delivery Network) is one of them. You need to use […]

December 15, 2021 in Code examples & Vue
Deven
Deven wrote

How to fix vue is not defined

In this article, you are going to learn about how to fix Uncaught ReferenceError: Vue is not defined. “Uncaught ReferenceError: Vue is not defined” is a common problem and if you are an absolute beginner you will face this problem once in your programming career. This error may occur for a few reasons. I will […]

December 15, 2021 in Errors solved
Deven
Deven wrote

How to “fix cannot read property of undefined” in Vue

In this article, you will learn about how to “fix cannot read property of undefined” in Vue. “Cannot read property of undefined” in Vue is a common error. It can occur for many reasons. Let me share my experience with you. Recently, I was working on a Vue project where I added a toggled functionality. […]

December 15, 2021 in Errors solved
Deven
Deven wrote

Learn How to create multi-select in Vue

In this article, you are going to learn about how to create multi-select in Vue. Vue is a modern JavaScript framework that is widely used in building user interfaces and progressive web applications. With Vue you can do lots of eye-catching things but here I will show you how you can build a custom multi-select […]

December 14, 2021 in Tutorials & Vue
Deven
Deven wrote

Learn How to fix the “data” option should be a function that returns a per-instance value in component definitions in Vue

In this article, you will learn about how to fix the “data” option should be a function that returns a per-instance value in component definitions in Vue. You often face some errors or warnings while working with vue at the very beginning level. Sometimes the errors and warnings are shown when you violate the basic […]

December 14, 2021 in Errors solved

npm run serve vs npm run dev in vuejs

In this guide, you will understand the driving mechanisms behind the two commands npm run serve vs npm run dev in vuejs npm run serve is basically asking the package manager (npm) to run the command specified under the name serve in the package.json file. The same goes for the npm run dev command. It […]

March 6, 2021 in Code examples

Using the Vue.nextTick function

In this article, you will learn about the Vue.nextTick callback function and when to make use of it. In plain terms, Vue.nextTick gives you access to the data instance after it has been updated, the new changes effected on the DOM but not yet rendered on the web page. We can visualize its role by […]

March 4, 2021 in Code examples

Using the @click directive in Vue

In this article, you will learn how to use the @click directive to handle events in vue. It is worthy of note, that the @click directive is similar to v-on:click event handler. lets assume we have a method that logs a simple message to the console. We can trigger this function by using the @click […]

March 4, 2021 in Code examples

Using the V-cloak directive in Vue

in this article, you will learn how to use the V-cloak directive in Vue. In simple terms, the v-cloak directive is used to hide an element while vue is mounting; it works best with a CSS property. Here is a basic instance of using the directive: we first declare a property in our css that […]

March 3, 2021 in Code examples

Fix ‘Unknown Custom Element’ in vue

In this article, you will learn how to register components locally and globally, to avoid the ‘unknown custom element error‘. Global Registration: Global registration of components is achieved using the Vue.component directive. This gives us access to make use of our component in any component. Local Registration: We can also register our components locally by […]

March 2, 2021 in Errors solved