DEV Community

Mohsen Fallahnejad profile picture

Mohsen Fallahnejad

Code on #JavaScript - Frontend

Six Year Club
Five Year Club
Four Year Club
Writing Debut
Three Year Club
Two Year Club
One Year Club
What is Docker? The 2-minute mental model

What is Docker? The 2-minute mental model

1
Comments
1 min read

Want to connect with Mohsen Fallahnejad?

Create an account to connect with Mohsen Fallahnejad. You can also sign in below to proceed if you already have an account.

Already have an account? Sign in
MVVM, Micro‑Frontends, and Domain‑Driven Frontend — A Practical Guide

MVVM, Micro‑Frontends, and Domain‑Driven Frontend — A Practical Guide

Comments
4 min read
Next.js App Router Caching — Cheat Sheet

Next.js App Router Caching — Cheat Sheet

Comments
2 min read
Microtask vs Macrotask in JavaScript — With Node.js vs Browser Notes

Microtask vs Macrotask in JavaScript — With Node.js vs Browser Notes

Comments
2 min read
JavaScript Promises Explained

JavaScript Promises Explained

Comments
2 min read
JavaScript Closures — A Simple Deep Dive

JavaScript Closures — A Simple Deep Dive

Comments
3 min read
Prefetching in Next.js Links Explained

Prefetching in Next.js Links Explained

Comments
2 min read
BroadcastChannel API in JavaScript

BroadcastChannel API in JavaScript

Comments
2 min read
React Context Explained: How It Works Under the Hood

React Context Explained: How It Works Under the Hood

Comments
3 min read
React Fiber Explained: How React’s Engine Actually Works

React Fiber Explained: How React’s Engine Actually Works

Comments
3 min read
useDeferredValue Explained: Keeping React UIs Responsive

useDeferredValue Explained: Keeping React UIs Responsive

1
Comments
1 min read
Are TypeScript Enums a Good Idea? (Bundle Size & Runtime)

Are TypeScript Enums a Good Idea? (Bundle Size & Runtime)

Comments
2 min read
Why async/await Doesn’t Make JavaScript Code Parallel

Why async/await Doesn’t Make JavaScript Code Parallel

Comments
2 min read
How Promise.all Works in a Single-Threaded JavaScript World

How Promise.all Works in a Single-Threaded JavaScript World

Comments
2 min read
Web Workers Explained for Frontend Developers

Web Workers Explained for Frontend Developers

Comments
2 min read
Promise APIs Compared: all vs race vs any vs allSettled

Promise APIs Compared: all vs race vs any vs allSettled

Comments
2 min read
queueMicrotask Explained: The Smallest Async Queue in JavaScript

queueMicrotask Explained: The Smallest Async Queue in JavaScript

Comments
1 min read
CDN Explained: What It Is, How It Works, and How to Use It in Next.js

CDN Explained: What It Is, How It Works, and How to Use It in Next.js

Comments
2 min read
React memo vs useMemo vs useCallback — When to Use Which

React memo vs useMemo vs useCallback — When to Use Which

Comments
2 min read
CORS Explained Simply — Why Your Fetch Works in Postman but Fails in the Browser

CORS Explained Simply — Why Your Fetch Works in Postman but Fails in the Browser

Comments
5 min read
?? vs || — The Default-Value Trap That Breaks Real Apps

?? vs || — The Default-Value Trap That Breaks Real Apps

Comments
3 min read
React useEffect Dependencies — The Bug That Keeps Coming Back

React useEffect Dependencies — The Bug That Keeps Coming Back

Comments
4 min read
Debounce vs Throttle — One Sentence to Remember Forever

Debounce vs Throttle — One Sentence to Remember Forever

Comments
3 min read
The Leaderboard That Ranked 9 Points Above 100

The Leaderboard That Ranked 9 Points Above 100

Comments
4 min read
You Selected Rows 3, 8, 12, 15 and 20. JavaScript Checked 3, 1 and 8.

You Selected Rows 3, 8, 12, 15 and 20. JavaScript Checked 3, 1 and 8.

Comments
4 min read
One Line in My Root Layout Turned 158 Static Pages Into 0

One Line in My Root Layout Turned 158 Static Pages Into 0

Comments
5 min read
The Settings Object That Came Back undefined

The Settings Object That Came Back undefined

Comments
4 min read
The $4.35 Item That Was Charged $4.34

The $4.35 Item That Was Charged $4.34

Comments
4 min read
The Leaderboard Arrived Sorted. JavaScript Re-sorted It by User ID.

The Leaderboard Arrived Sorted. JavaScript Re-sorted It by User ID.

Comments
4 min read
Scrolling My Blog Index Prefetched All 51 Posts. One Config Line Cut It to 90 kB.

Scrolling My Blog Index Prefetched All 51 Posts. One Config Line Cut It to 90 kB.

Comments
4 min read
The Server Action That Ran Twice, but Only on localhost

The Server Action That Ran Twice, but Only on localhost

Comments
4 min read
useTransition Explained: Make React Feel Instant

useTransition Explained: Make React Feel Instant

Comments
3 min read
JavaScript Generators & Iterators — Lazy Sequences Explained

JavaScript Generators & Iterators — Lazy Sequences Explained

Comments
3 min read
I Optimized a Button From O(n) to O(1). The Speed Didn't Matter.

I Optimized a Button From O(n) to O(1). The Speed Didn't Matter.

Comments
8 min read
Understanding HttpOnly Cookies in Depth

Understanding HttpOnly Cookies in Depth

3
Comments
2 min read
Why MUI Avoids Theme Flash on First Load (Dark/Light Mode)

Why MUI Avoids Theme Flash on First Load (Dark/Light Mode)

Comments
2 min read
Deep Copy vs Shallow Copy in JavaScript

Deep Copy vs Shallow Copy in JavaScript

Comments
2 min read
Why setState Doesn’t Cause Hydration Errors

Why setState Doesn’t Cause Hydration Errors

Comments
2 min read
JavaScript is Single-Threaded

JavaScript is Single-Threaded

Comments
2 min read
How useState Works Under the Hood (and Why It Needs use client)

How useState Works Under the Hood (and Why It Needs use client)

1
Comments
3 min read
Next.js Page Router vs App Router

Next.js Page Router vs App Router

Comments
2 min read
What is 'use client' in Next.js?

What is 'use client' in Next.js?

Comments
2 min read
AbortController & AbortSignal

AbortController & AbortSignal

2
Comments 2
3 min read
React Higher-Order Components (HOC)

React Higher-Order Components (HOC)

2
Comments 3
2 min read
JavaScript Event Bus 🚍 (JS + TypeScript)

JavaScript Event Bus 🚍 (JS + TypeScript)

5
Comments
3 min read
JavaScript's Event Loop — Simple Guide (with SVG Timeline)

JavaScript's Event Loop — Simple Guide (with SVG Timeline)

Comments
1 min read
Frontend Design Patterns — A Practical Guide

Frontend Design Patterns — A Practical Guide

2
Comments
3 min read
Git Rebase vs Git Merge — Simple Guide

Git Rebase vs Git Merge — Simple Guide

3
Comments
2 min read
When Should You Use Dynamic Import in React/Next.js? (With Performance Comparison)

When Should You Use Dynamic Import in React/Next.js? (With Performance Comparison)

1
Comments 2
2 min read
React useRef vs useState — When to Use Which

React useRef vs useState — When to Use Which

2
Comments
2 min read
SOLID Principles Explained Simply

SOLID Principles Explained Simply

Comments
2 min read
Async vs Sync in JavaScript

Async vs Sync in JavaScript

Comments
1 min read
Event Bubbling vs Event Capturing in JavaScript

Event Bubbling vs Event Capturing in JavaScript

Comments
1 min read
filtered list for live search

filtered list for live search

4
Comments
1 min read
Customize .sort() method in JS

Customize .sort() method in JS

5
Comments
1 min read
COPY to the clipboard in JS

COPY to the clipboard in JS

41
Comments 3
1 min read
Using function in v-model

Using function in v-model

2
Comments
1 min read
State Switching..!

State Switching..!

4
Comments
2 min read
How to generate an ID for Array sequentially ?!

How to generate an ID for Array sequentially ?!

3
Comments
1 min read
loading...