What is nextTick and what does it do in Vue.js?

It’s all about Timing nextTick allows you to execute code after you have changed some data and Vue.js has updated the virtual DOM based on your data change, but before the browser has rendered that change on the page. Normally, devs use the native JavaScript function setTimeout to achieve similar behavior, but using setTimeout relinquishes … Read more

How to remove an item from an array in Vue.js

You’re using splice in a wrong way. The overloads are: array.splice(start) array.splice(start, deleteCount) array.splice(start, deleteCount, itemForInsertAfterDeletion1, itemForInsertAfterDeletion2, …) Start means the index that you want to start, not the element you want to remove. And you should pass the second parameter deleteCount as 1, which means: “I want to delete 1 element starting at the … Read more

Vue template or render function not defined yet I am using neither?

In my case, I was getting the error because I upgraded from Laravel Mix Version 2 to 5. In Laravel Mix Version 2, you import vue components as follows: Vue.component( ‘example-component’, require(‘./components/ExampleComponent.vue’) ); In Laravel Mix Version 5, you have to import your components as follows: import ExampleComponent from ‘./components/ExampleComponent.vue’; Vue.component(‘example-component’, ExampleComponent); Here is the … Read more