DEV Community

Parsa Jiravand profile picture

Parsa Jiravand

Frontend developer building back-office tools with server-driven UI. Big on clean architecture, TypeScript, and writing about the craft. Currently shipping a dev post a day.

Location Istanbul - Turkey Joined Joined on  Personal website https://github.com/parsajiravand

Education

Master of IT

Pronouns

Parsa

Work

Senior frontend developer

Your Recipe App Is Hiding a Silent Video

Your Recipe App Is Hiding a Silent Video

Comments
5 min read

Want to connect with Parsa Jiravand?

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

Already have an account? Sign in
React Compiler 1.0: What useMemo You Can Delete

React Compiler 1.0: What useMemo You Can Delete

8
Comments
12 min read
Your Timer Doesn't Know You Tabbed Away

Your Timer Doesn't Know You Tabbed Away

8
Comments 1
4 min read
NestJS Dependency Injection Explained (with Cheat Sheet)

NestJS Dependency Injection Explained (with Cheat Sheet)

9
Comments
11 min read
Stop Regex-Parsing document.cookie. Use CookieStore

Stop Regex-Parsing document.cookie. Use CookieStore

9
Comments 1
5 min read
The await That Silently Breaks navigator.clipboard.writeText()

The await That Silently Breaks navigator.clipboard.writeText()

11
Comments
5 min read
You're not quiet in meetings, you're editing

You're not quiet in meetings, you're editing

17
Comments
8 min read
Shadow DOM Needed JavaScript to Exist. Now It Doesn't.

Shadow DOM Needed JavaScript to Exist. Now It Doesn't.

18
Comments 2
5 min read
Next.js Cache Components Explained (with Cheat Sheet)

Next.js Cache Components Explained (with Cheat Sheet)

8
Comments
12 min read
Your Router Doesn't Intercept Navigation. It Reacts To It.

Your Router Doesn't Intercept Navigation. It Reacts To It.

8
Comments
5 min read
Debounce and Throttle in JavaScript: The Complete Guide

Debounce and Throttle in JavaScript: The Complete Guide

13
Comments 1
11 min read
You Don't Need a WebSocket for That Live Feed

You Don't Need a WebSocket for That Live Feed

7
Comments
6 min read
Nuxt useState vs ref(): Why Server State Leaks Across Users

Nuxt useState vs ref(): Why Server State Leaks Across Users

10
Comments
12 min read
Delete Your padding-bottom Aspect-Ratio Hack

Delete Your padding-bottom Aspect-Ratio Hack

9
Comments
5 min read
React Re-render vs Remount: What Actually Triggers Each

React Re-render vs Remount: What Actually Triggers Each

19
Comments 1
11 min read
The outline: none Debate Has Been Over Since 2020

The outline: none Debate Has Been Over Since 2020

16
Comments
4 min read
NestJS Request Lifecycle Explained (with Cheat Sheet)

NestJS Request Lifecycle Explained (with Cheat Sheet)

21
Comments 1
11 min read
Your Grid Has Invisible Columns: auto-fill vs auto-fit

Your Grid Has Invisible Columns: auto-fill vs auto-fit

14
Comments
4 min read
You're truncating bios with `.slice()`. `Intl.Segmenter` knows where the emoji actually end.

You're truncating bios with `.slice()`. `Intl.Segmenter` knows where the emoji actually end.

23
Comments 2
5 min read
Delete Your Auto-Resize Textarea JS. CSS Does It Now.

Delete Your Auto-Resize Textarea JS. CSS Does It Now.

18
Comments 1
5 min read
Nobody tells you the question window is closing

Early job ignorance costs credibility fast

Nobody tells you the question window is closing

18
Comments 4
6 min read
JavaScript Closures: The Complete Guide (with Cheat Sheet)

JavaScript Closures: The Complete Guide (with Cheat Sheet)

16
Comments
12 min read
CSS Animations Can't Pause. The Web Animations API Can.

CSS Animations Can't Pause. The Web Animations API Can.

12
Comments
5 min read
Vue Reactivity Explained: ref vs reactive (+ Cheat Sheet)

Vue Reactivity Explained: ref vs reactive (+ Cheat Sheet)

16
Comments
11 min read
JavaScript Proxy and Reflect: The Complete Guide

JavaScript Proxy and Reflect: The Complete Guide

16
Comments 3
13 min read
The CSS Selector Built to Lose Every Fight

The CSS Selector Built to Lose Every Fight

20
Comments 1
5 min read
One version bump, 40 files to edit. Import maps fix that.

One version bump, 40 files to edit. Import maps fix that.

16
Comments
5 min read
Your fetch in beforeunload is silently killed. navigator.sendBeacon guarantees delivery.

Your fetch in beforeunload is silently killed. navigator.sendBeacon guarantees delivery.

19
Comments 1
4 min read
The Modal Was Open. So Was Everything Behind It.

The Modal Was Open. So Was Everything Behind It.

16
Comments
5 min read
Stop Writing Regex to Match URLs — The Browser Already Can

Stop Writing Regex to Match URLs — The Browser Already Can

18
Comments
5 min read
Stop Writing Media Queries for Font Size

Stop Writing Media Queries for Font Size

16
Comments 1
4 min read
I Ripped Out a Carousel Library. CSS Replaced It.

I Ripped Out a Carousel Library. CSS Replaced It.

22
Comments 1
4 min read
Stop Writing Math.cos() in a Resize Listener

Stop Writing Math.cos() in a Resize Listener

21
Comments
4 min read
I Can Finally Delete My max-height: 9999px Animation Hack

I Can Finally Delete My max-height: 9999px Animation Hack

26
Comments
5 min read
Five tabs open, one refresh token — the race nobody noticed

Reveals why multi-tab apps trigger sudden logouts

Five tabs open, one refresh token — the race nobody noticed

24
Comments 4
5 min read
You copy and reverse the array to find the last match. `findLast()` searches from the end directly.

You copy and reverse the array to find the last match. `findLast()` searches from the end directly.

23
Comments
3 min read
Your `fetch()` in `beforeunload` is being silently dropped. Use `navigator.sendBeacon()`.

Your `fetch()` in `beforeunload` is being silently dropped. Use `navigator.sendBeacon()`.

26
Comments 2
4 min read
You're blocking touchmove events to contain scroll. `overscroll-behavior` does it natively.

You're blocking touchmove events to contain scroll. `overscroll-behavior` does it natively.

22
Comments
4 min read
You're polling setInterval to detect DOM changes. `MutationObserver` fires when they happen.

You're polling setInterval to detect DOM changes. `MutationObserver` fires when they happen.

22
Comments
4 min read
You're importing pako to gzip data. `CompressionStream` does it natively.

You're importing pako to gzip data. `CompressionStream` does it natively.

28
Comments 2
4 min read
Stop using the localStorage hack to sync browser tabs. BroadcastChannel does it natively.

Avoids localStorage cleanup bugs

Stop using the localStorage hack to sync browser tabs. BroadcastChannel does it natively.

56
Comments 14
4 min read
You built your modal with a `<div>` and a focus trap library. The native `<dialog>` does all of that.

You built your modal with a `<div>` and a focus trap library. The native `<dialog>` does all of that.

20
Comments
4 min read
Stop importing `uuid`. `crypto.randomUUID()` has been native since 2021.

Stop importing `uuid`. `crypto.randomUUID()` has been native since 2021.

20
Comments
3 min read
You're installing date-fns for 'X hours ago'. `Intl.RelativeTimeFormat` does it natively.

You're installing date-fns for 'X hours ago'. `Intl.RelativeTimeFormat` does it natively.

22
Comments
4 min read
You use `obj.hasOwnProperty(key)` to check property ownership. It can silently fail. `Object.hasOwn()` is the safe replacement.

You use `obj.hasOwnProperty(key)` to check property ownership. It can silently fail. `Object.hasOwn()` is the safe replacement.

17
Comments
4 min read
Container queries can check more than size — style queries let components read custom property values

Container queries can check more than size — style queries let components read custom property values

23
Comments
4 min read
You're collecting async iterable results with a for-await loop. `Array.fromAsync` does it in one call.

You're collecting async iterable results with a for-await loop. `Array.fromAsync` does it in one call.

23
Comments
4 min read
Your browser renders everything, even what you can't see — `content-visibility: auto` fixes that

Your browser renders everything, even what you can't see — `content-visibility: auto` fixes that

42
Comments 1
4 min read
CORS Explained: The Complete Guide (with Cheat Sheet)

CORS Explained: The Complete Guide (with Cheat Sheet)

23
Comments 7
13 min read
Your UI is freezing because you never gave the browser a break

Your UI is freezing because you never gave the browser a break

21
Comments
4 min read
You're writing dark-mode colors twice. `light-dark()` fixes that.

You're writing dark-mode colors twice. `light-dark()` fixes that.

20
Comments
5 min read
You've been wrapping `new URL()` in try/catch. `URL.parse()` does it natively.

You've been wrapping `new URL()` in try/catch. `URL.parse()` does it natively.

21
Comments
5 min read
CSS has no native scoping. `@scope` changes that.

CSS has no native scoping. `@scope` changes that.

28
Comments 3
5 min read
Array methods are eager. Iterator helpers are lazy. Here's why that matters.

Array methods are eager. Iterator helpers are lazy. Here's why that matters.

22
Comments
4 min read
You reach for Sass to mix colors. `color-mix()` does it natively.

You reach for Sass to mix colors. `color-mix()` does it natively.

22
Comments
4 min read
You hand-edit headlines to avoid orphaned words. `text-wrap: balance` does it natively.

You hand-edit headlines to avoid orphaned words. `text-wrap: balance` does it natively.

17
Comments
4 min read
You copy and reverse the array to find the last match. `findLast()` searches from the end directly.

You copy and reverse the array to find the last match. `findLast()` searches from the end directly.

22
Comments 1
3 min read
You're watching `window` to detect element size changes. `ResizeObserver` watches the element itself.

You're watching `window` to detect element size changes. `ResizeObserver` watches the element itself.

22
Comments 1
4 min read
You use a setTimeout to trigger CSS entry animations. `@starting-style` makes it unnecessary.

You use a setTimeout to trigger CSS entry animations. `@starting-style` makes it unnecessary.

19
Comments 1
4 min read
You still write `finally { resource.close() }`. The `using` keyword does it automatically.

You still write `finally { resource.close() }`. The `using` keyword does it automatically.

14
Comments 3
4 min read
loading...