Photo by AltumCode on Unsplash

This article briefs about middlewares in React and how redux-thunk works.

What is a Middleware?

Middlewares are plain JavaScript functions.

They get executed with every action we dispatch.

Before we get into middlewares, the basic algorithm of the redux is

  1. Action creators produce an action.
  2. The action gets fed to the dispatcher.
  3. The dispatcher sends it to the reducers.
  4. Reducers updates or modifies the State.

Action creators are the ideal place to make the network requests. In the action creators we make the network requests and return action object with network response in the “payload” property.

To begin with, lets…

Javascript is a light weight (doesn’t eat up much memory) cross platform (not only for web development) multi-paradigm language.

JS is one of the 3 core technologies in web development.

HTML :: Content.

CSS :: Presentation.

JS :: Dynamic effects/programming logic.

Javascript to Machine code.

Javascript files are always hoisted in some environment either in browser or other environments like Node.

The hoisted environment has the Javascript engine that takes our code and executes it. One such is v8 engine from Google.

Inside javascript engine our code will be parsed by a parser, which basically reads our code line by line and checks for…

Before we get started, what does PWA means ?

PWA means Progressive Web Apps. It is just a term referring to couple of features we add to our existing web application/web pages to make it more interative and feel like a native application.

We add features and functionality to make our simple web page/application as progressive web app.

What makes a simple application to PWA ?

1. Adding web pages as native application (icon to Home Screen).

When we visit a site, a pop up appears to add site as application in home screen of our device.

Why do we need this? It is simple, to increase user interaction and help…

Karthik Saravanan

Front-end developer.

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