JavaScript allows you to pass multiple parameters to a function which will be used as a callback. A callback function is basically a function which you can pass to another…
Break points not working / pointing to wrong line numbers in Vue.js?
Debugger make the life of developers a breeze. But at the same time, if they don't work properly, it can quickly turn into a nightmare. With a JavaScript framework like…
How to pass a state from child to parent component using callbacks in React.js?
The data flow in React.js is always one-way and follows the top-down approach. That is, you can only pass states using props from parent to child component. However, there's a…
How to bind a function in a class in JavaScript with this keyword?
JavaScript can be a little tricky at times as compared to other languages. This relates to the fact that JavaScript deals with scoping and binding mechanisms differently. To make it…
How to pass a functional child component to a parent component in React.js?
The ability to pass a functional child component to a parent component is one of the most powerful features provided by React.js. Here in this tutorial, I'll show you how…
How to emit an event with parameters to parent component in Vue.js?
Vue gives you the flexibility to emit an event with parameters to a function present in the parent component. This is one of the most powerful, yet underrated features of…
Convert seconds to hours and minutes in Vue.js | Example
In this example, I'm going to show you how you can convert seconds to hours and minutes without using any library. Most of the time, duration is stored to the…
How to generate a random RGB color in Vuejs? Example
Vue.js is extremely powerful when it comes to quick dynamic style binding. And therefore, you can generate a random RGB color using Vue.js without using any 3rd party library or…
How to make text editable on click in Vue.js? Example
Sometimes you may want users to be able to edit content or text without having to show an input or text field. This comes useful in situations when some quick…