Web Development

Detecting click outside component using React hooks

Detecting click outside component using React hooks

  • November 10, 2020

If you have tried developing your own dropdown, modal, or popover in React, you would have come across this. “How do I detect a click outside my react component so that I can close it?” Detecting click outside component is luckily is not that difficult. This post will use react...

Beating JSON performance using Protocol Buffers

Beating JSON performance using Protocol Buffers

  • October 20, 2020

Protocol buffers or Protobuf, is a binary format that was created by Google to serialize structured data that is transferred among services. Before we get into what protocol buffers are, let us first look into JSON. JSON clearly has great advantages when it comes to being a data interchange format...

The new Logical Assignment Operators in JavaScript

The new Logical Assignment Operators in JavaScript

  • October 8, 2020

The latest version of ECMAScript introduced three new logical assignment operators: nullish, AND, and OR operators. These are supported from Firefox 79 onwards, Chrome 85 onwards, and naturally there is no IE support but since Edge is now chromium based, it is available there too. They are not available in...

How to groupby using reduce in JavaScript

How to groupby using reduce in JavaScript

  • October 1, 2020

The groupBy method is one of the reasons people use lodash in their project. In this blog post, we will write our own version of groupBy using reduce and vanilla JavaScript. What groupBy does? groupBy works on an array of items, and it groups these items together into an object...

Learning context API and the useContext React hook

Learning context API and the useContext React hook

  • September 15, 2020

In this react hooks series, we have already explored the react hooks useState, useEffect, and useReducer. The next react hook we will look into is the useContext hook. As we saw while building our sample application, we had to lift the state up to our root component in order to...

Understanding the useReducer hook in React

Understanding the useReducer hook in React

  • September 1, 2020

Building upon our React hooks introduction from our previous post on understanding React hooks (useState and useEffect), we will look at the useReducer hook in this post. useReducer hook can be an alternative to useState (in fact, useState uses useReducer internally). Before getting into how to use the useReducer hook,...

React Hooks and Local Storage: Let’s build a ToDo app

React Hooks and Local Storage: Let’s build a ToDo app

  • August 25, 2020

React hooks have been around for quite some time. They have been widely adopted by the React community since then and have started becoming the defacto for newer React applications. A react hook allows developers to hook into React features. React hooks allow building components by using functions instead of...

Using async/await in ExpressJs

Using async/await in ExpressJs

  • August 6, 2020

If you have not been living under a rock for the past few years, you probably have heard of async/await. It has been one of the interesting additions to EcmaScript. It makes control flow easier to understand and read and also allows to write concise, maintainable code. If you need...