Photo by Mike Lewis HeadSmart Media on Unsplash

Events are everywhere in web programming — input change, mouse move, button click, and page scroll are all forms of events. These are the actions that get generated by the system so that you can respond to them however you like by registering event listeners.
This results in an interactive experience…


Prototypal Delegation in JavaScript

JavaScript language stands on two pillars: functional programming and prototypal delegation. The addition of classes in JavaScript is mere a syntactic sugar to give it Object-oriented programming feel: unwrap them and you will find functions inside.

Prototypal Delegation

Prototypal delegation is all about delegating the responsibility to the prototype higher up in…


Photo by Shaojie on Unsplash

I am sure you might have seen the following line of code either while reading someone’s code or in a library.

Object.prototype.hasOwnProperty.call(objRef, ‘propName’);

And now you are wondering what on earth this code is doing. You start doubting your JavaScript skills. Don’t worry. You are at the right place. 😃


Never break your promise — Photo by marcos mayer on Unsplash

For a long time React developers have been inventing and sharing different patterns of reusing code logic — Higher order component and render props are to name a few. It was because React had no stateful primitive simpler than class component. Finally, the advent of hooks into the React ecosystem…


Photo by Rob Lambert on Unsplash

Anything that cuts some of your arduous task time is good for your productivity. Debugging is one of those strenuous tasks. Developers strive to write bug-free code, but we all know that it’s not easy. No one likes to see bugs in their code — those red color lines are…


Photo by freestocks.org on Unsplash

Closures can be a daunting concept when you are new to JavaScript world. Scouring the internet will give you tons of definition about what closure is. But I have felt that mostly these definitions are vague and don’t explain the fundamental cause of their existence.

Today we will try to…


Photo by Dlanor S on Unsplash

JavaScript is an interesting language and we all love it because of its nature. Browsers are the home for JavaScript and both work together at our service.
JS has a few concepts where people tend to take it lightly and sometime may tumble over. Concepts like prototyping, closures and event-loops…


Photo by Chris Ried on Unsplash

We all know that in order to pass a function as props to the child component we have to do one of the following:


Photo by Cameron Kirby on Unsplash

The year 2018 brought a lot of new features into the React Ecosystem. The addition of these features is helping developers to focus more on user experience rather than spending time writing code logic.

It seems that React is investing more towards a functional programming paradigm, in a search of…


Photo By The Roaming Platypus on Unsplash

Extending your class components from PureComponents gives you the benefit of avoiding wasteful re-renders. It does a shallow comparison of your new props/state with previous props/state and returns true if a re-render is required; otherwise, returns false. …

Amandeep Singh

Developer @ Domain Sydney. Tech enthusiast and a pragmatic programmer. If coding is hard, you are not doing it right.

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