Posts for Kelvin Gobo

Kelvin Gobo is a Frontend Developer with a demonstrated knowledge in building web applications. He is skilled in crafting beautiful user interfaces, web tooling and performance optimization, and progressive web apps.

Validating Vue.js Forms Using Vuelidate

Getting user input is crucial for many web apps as it enables the web app to give the user a more personalized experience. However, getting user input is not so straightforward because you have to: Make sure you are getting the right input from the user Make sure the input is in the correct format […]

June 4, 2020 in Tutorials & Vue

Vue.js Snippets – Make API Request on User Input

Some applications like Gmail and Facebook have a search feature where as a user enters some input, the input is sent to the server and the results are used to provide the user with results closer to what the user is looking for. To implement this behaviour in Vue, we use a library called debounce […]

May 16, 2020 in Snippets

Vue.js Snippets – Display Loader while Fetching Content

When loading data in Vue.js applications, you may want to display some form of loading indicator so your users will know that something is happening. Vue.js provides us with the v-if directive which allows us to conditionally show/hide any piece of markup. In the snippet below, we have our data property loading which is set […]

May 15, 2020 in Snippets

How to Capitalize Text with JavaScript

In this article, you will learn to Capitalize Text with JavaScript. JavaScript has built-in methods like .toLowerCase() – to convert text to lower case – and .toUpperCase() – to convert text to upper case. However, there’s no built-in method to convert text to title case i.e. “How Are You”. However, we can combine .toUpperCase() with […]

May 7, 2020 in Snippets

Vue.js Snippets – Delete Item from List

There are a few common operations that are performed on lists: add a new item, search through the list, and deleting an item from a list. The snippet below shows how to delete an item from a list. list is an array of names. In the <template>, we render the list using v-for. For each […]

May 7, 2020 in Snippets

Vue Snippets – Conditional Style Binding

A common use for data binding is to conditionally alter the classes and styling of an element. The snippet below shows how this can be achieved: By default, the <p> tag is styled to have a red text color. However, <p> tags with the .active class get styled with a blue text. Since the data […]

May 6, 2020 in Snippets

JavaScript Snippet – Download Picture/Video

There are a couple of ways to download media assets on the web. One of them involves making an HTTP request to the location of the media asset and using JavaScript inbuilt methods to manipulate the asset. To get started, we add a button to our markup that would trigger the download. We add an […]

May 5, 2020 in Snippets

API Mocking with Vue and Mirage JS

Single-page applications (SPAs) continue to gain more and more popularity every day. As the complexity of these SPAs increases, the need for dynamic/realtime data increases as well. APIs provide a way to bridge the gap between the SPA and the backend. There are times, however, when the required API is not available or it’s just […]

May 4, 2020 in Tutorials & Vue

Vue Snippets – Search List Filter

Filters are part of many applications as it helps the user sort through a wide range of items. We can use the combination of v-model and computed properties to achieve this. In the snippet above, we have a list of items and an input field. As you type into the input field, the list gets […]

May 1, 2020 in Snippets

Vue Snippets – Add Data to List

Sometimes you have a list of items you would like to add to, based on some user interaction or event. The snippet below gives a base template to achieve this. In the snippet above, we have a list, an input field and a button. When the button is clicked, the value of the input field […]

May 1, 2020 in Snippets

CI/CD with GitHub, Travis CI, and Heroku

The idea of Continuous Integration (CI) stems from the principle that developers should push code more frequently to a shared repository like GitHub. With that in place, tests can be written by the developers to verify the integrity of the code. Then a CI service can pick up the code, build it and run tests […]

April 3, 2020 in Git