Javascript (7)


ES6 Javascript quick recap cookbook




Add Axios to your Vue app

Install axios npm install –save axios Then goto src/ folder and add a file called RestAPIService.js. In this file we will reside all our AXIOS interfacing code and Rest API calls. The RestAPIService.js looks like this:

The Service has two methods getCodes and getRate. They hit the respective endpoints to get currency codes and […]




Building Front-End App in Vue with Vuetify – Part 2

We have been building Currency Converter using Vue.js. In the part-1 we built the basic layout of the app with navbar. In this tutorial we will setup a form with validation. The code for this is here. Please note that the code has been committed under commits matching with Parts. So for complete code for […]




Building Front-End App in Vue with Vuetify – Part 1

In this series, we will be building front-end app Currency Converter using Vue and Vuetify. The code for this is here. Please note that the code has been committed under commits matching with Parts. So for complete code for this tutorial, please refer to commit branch “part-1”. Pre-requisites: Please ensure that npm-cli is installed. You […]




Tips for making reusable React components

Tip 1: props.children

Instead of invoking the component with a self-closing tag <Picture /> if you invoke it will full opening and closing tags <Picture> </Picture> you can then place more code between it and display using this.props.children (props.children for stateless components) . This decouples the <Picture> component from its content and makes it more reusable. Tip 2: Stateless Components […]




Generator Functions in Javascript

We will be building on what we discussed in previous post generator-functions-using-co Here we will focus on how to implement something analogous to co. i.e. actually implement an iterable. How to run the function* Steps involved in running through a generator function. If its a bit confusing, it will be clear when we look at the […]




Generator Functions using co

Generator functions are a concept lifted likely from Python where they are used heavily in applications like web-crawlers. There are no prerequisites to this article but if you had an idea about Python generators, its the exact same concept implemented in Javascript. Definition Generators are functions which can be exited and later re-entered. Their context […]