Testing Vue Component with Mocha and Chai

Previously, We have created a Toggle Botton component with Vue. You can download the complete source codes from the GitHub repository. Today, we are going to implement Unit testing for our Vue component. And we are going to use the Mocha and Chai to perform the testing. Mocha is a simple and feature-rich test framework for javascript. Before jumping directly to the codes, Make sure to add the required packages to the unit testing environment.

Read More

Create Toggle / Switch Button with Vue Js

We are going to create a Toggle / Switch button component with Vue Js. Before starting, The basic thing to keep in mind that the Toggle / Switch button could have only one state i.e. On / Off or True / False. So all the implementation is based on this state.

Read More

Communication between Parent-Child Components in Vue Js

Today, we are going to learn how to communicate between components in Vue Js. To more understanding, We are going to play with a basic Shopping Bag example. The shopping bag will display the simple number of items. Our shopping bag will be going to use two events i.e. increment and decrement to adjust the number of items. Let’s jump to the codes without any delay.

Read More