Category: VueJs

How to use $refs in Vue 3 with Composition API and Script Setup

This post is going to explain how to use Ref in Vue 3, while using the Composition API and the Script Setup. The usage of references when using the options API is unchanged, but Vue 3 provided us with two different ways to define the component script block, Composition API and Script Setup. In the…


How to use Slots and Attrs with the Composition API

In this article, we are going to describe how to successfully access slots and attributes while using the Composition API and Script setup syntax. The use of these features while writing components using the Options API was quite simple, as all context was available within the “this” scope, but since the introduction of the composition…


How to fix – Slot invoked outside of the render function

If you are reading this post, chances are that have encountered the following message while trying to access the slot.default() Slot “default” invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead. In this post, we are going to explain the…


How to use variables in CSS with v-bind in VueJs 3

Frontend frameworks like VueJs, React and Svelte offer great flexibility in the development of UI components. The simplicity in which we can create components with dynamic properties offers the possibility to solve complex requirements with just a few lines of code. If you have been using VueJs, you are probably aware of the limitation that…


How to use Props in VueJs

In this post we are going to explain how to use properties using the VueJs framework. The post expect a basic understand on the framework itself and will not cover the basic configurations. First and foremost, we should introduced what Properties are in VueJs. My definition of props is: VueJs properties are variables (static or…