Muhammad Hasnain

Muhammad Hasnain @hasnaindev

Joined:
Jul 20, 2020

Muhammad Hasnain
articles - 12 total

Design Pattern: Singleton - Probably the easiest explanation!

Table of Contents What is Singleton? Implementation. When to Use? An Anti-pattern? ...

Learn More 5 0Aug 16 '21

Four Ways to Clone Array with Ease! Easiest Method to Clone Array.

Visit my personal blog for more awesome content. hasnain.dev Unlike primitive types, arrays cannot...

Learn More 8 6Jul 30 '21

Dynamic Module Pattern for JavaScript! Dynamically load JavaScript bundles.

Original post on my personal blog. hasnain.dev Note: Please make sure that you are already aware...

Learn More 11 0Jul 30 '21

What is your go-to state management library? No frameworks!

Hello. What is your go-to state management library? I know we can use redux without React and I...

Learn More 3 0Jul 13 '21

How to lazy-load images? The easiest way to lazy-load images on your website! 🖼

Lazy-loading is the simple process of loading resources only when they are needed. These resources ca...

Learn More 49 6Jun 5 '21

NodeJS Worker Thread on EC2 Instance with single thread?

Hi! I'm not a 100% familiar with NodeJS workers and clusters. I know that we can make use of multipl...

Learn More 0 2May 21 '21

How would you tackle this NodeJS project?

Hello! I work at a startup and have been working on a cool project NodeJS based project. Even though...

Learn More 5 4May 19 '21

Introducing Browsermeta: Debugging made (super) easy!

Sometimes you write code that runs exactly as you expected but fails to run for a client on their mac...

Learn More 2 0Mar 22 '21

How I became a web developer in a year without a degree, a bulletproof method.

Table of Contents Preface Need for Clarity Inverse Goal Setting (The Bulletproof Method)...

Learn More 202 29Feb 1 '21

Easiest way to convert HTMLCollection into an Array!

There are two ways in which you can convert an HTMLCollection or a NodeList into an array. If you do...

Learn More 31 2Jan 11 '21

Custom Google Maps styles, with night mode! 🌒

Dark mode has become a trend in modern day websites (pun intended, i'm so funny 🤪). Recently, I worke...

Learn More 17 2Jan 6 '21

Easiest way to convert JavaScript object to map!

const person = { name: 'Hasnain', age: 22, profession: 'Web Developer', }; const map = new Ma...

Learn More 23 3Jan 1 '21