A single solution to all React Applications…

All applications have actions. An action is a function that modifies the state. Conceptually an action always occurs in response to an event. For example: click of a button, on change of text, on submit etc.

Rootz provides factory functions called as Action Generators to create actions. The focus is more on what is the new state and how is it going to be changed, rather thinking about how the actions are going to change or update the state. This separates the concern of “How” and “What”. It expects the user to focus…


In this post we’ll see how to fetch data using Promises and async/await in a React application.

  1. We will first see how we can fetch data in react using hooks.
  2. Followed by a discussion on how to fix regeneratorRuntime error while using fetch or async/await. Although create-react-app supports async/await out of the box. Using customised webpack configurations may result in regeneratorRuntime errors.

When a JavaScript date has gone bad, “Don’t call me,I’ll call you. I promise!” — anonymous

About Promises

The giggle mentioned above explains, the nature and behaviour of what promises are and what their existence means. …


Logically, async operations are intended to be non-blocking operations. Javascript is single threaded. Hence multiple simultaneous operations are not possible. Web Workers do allow to create a virtualised thread over the main thread. But they are somewhere limited compared to the actual concept of threading. Comparing them would be like apples to oranges.

Although if you want to compare, you can compare the concept of async/await with PIC(Programable Interrupt Controller) in microprocessors on the higher side.

What is PIC, and why is async/await similar to it ?

In a gist what PIC does is, during a task being performed by the microprocessor, there could many other tasks(prioritised) which might need processor’s…


Javascript Frameworks became an important part of the web since the initial prototypes successfully resulted in handling HTML with JavaScript. Since then the bars have been increased significantly in building modern web applications. Some got framed into a full end-to-end frameworks like Angular, while some provided an open platform for building interactive web applications. One such example of the later is React.

React is one of those answers to the modern day application development. …

@3sh

Love to scribble about JavaScript and React JS. Been almost a decade with the tech. I feel i can be of some help to those looking forward on these buddies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store