Posts for Prince Chukwudire

Driven JavaScript Enthusiast, keen on pixel perfect implementation of UI designs centered on good user experience.

Using and understanding $refs in vue

Vue Refs are instance properties used to make reference to HTML elements in our vue application. In this guide, we will take a look at using $refs in accessing and manipulating DOM elements in vue. We simply changed the value of the input tag by making reference to it. This is similar to what we […]

February 17, 2021 in Code examples

Class Binding in Vue with Vue v-bind

In this guide, we will look at class binding with the Vue v-bind directive. Class binding comes in handy when we have the need of manipulating an element’s class list. We can either pass an object or array to dynamically toggle a class. Object Syntax The above syntax means that the class active would be […]

February 17, 2021 in Code examples

Conditional rendering with Vue v-if

Conditionals are a core part of programming languages. The vue framework uses the v-if directive amongst others in handling this. The Vue v-if directive renders a block of code if its directive is truthy. As long as the expression isActive remains truthy, our block keeps displaying. The reverse is the case when it is false.

February 17, 2021 in Code examples

Using the Vue mounted lifecycle hook

Life cycle hooks are windows to the driving factors of our frameworks. They help us keep track of what happens to our components. Typically, this is when they are created, updated, destroyed or before either happens. Vue Mounted lifecycle hook is a function called after the instance is mounted. It is however worthy of note […]

February 17, 2021 in Code examples

Using the Vue created lifecycle hook

In this guide, we will be looking at Vue created lifecycle hook. In general, life cycle hooks are windows to the driving factors of our frameworks. In a nutshell, they help us keep track of what happens to our components. This would usually be when they are created, updated, destroyed or before either of the […]

February 17, 2021 in Code examples

Building a Reverse Geocoding app in Nuxtjs using Mapbox

In this article, we will have a general overview/insight into geocoding; forward geocoding, and reverse geocoding. We will go-ahead to build a mini-app that utilizes the concept of reverse geocoding to display specific locations. We would be using mapbox and Nuxtjs primarily to achieve this. In clear terms, Geocoding involves transforming text-based locations into geographic […]

November 19, 2020 in Vue