Loading video...

Video Failed to Load

Go Home

JavaScript Maps (new Map()) are more performant, ergonomic, and overall useful than you might think. You may want to consider using them more often than you likely are. Full video is now out!

203,263 views • 3 years ago •via X (Twitter)

10 Comments

Steve (Builder.io)'s profile picture
Steve (Builder.io)3 years ago

You know the drill - more good stuff you can do with Maps and Sets in my full blog post:

Jamie Kyle is on 🦋's profile picture
Jamie Kyle is on 🦋3 years ago

It's a good recommendation, but you don't need to use: p) You can use: Object.hasOwn(o, p)

Anonymous Sentinelæ's profile picture
Anonymous Sentinelæ3 years ago

This kind of tips are really useful, it's a shame that people waste time with TS and React that have extremely bad performance compared to JS, for no benefit other than the lies they sell on propaganda to profit over naive devs.

Random's profile picture
Random3 years ago

Please check this

Steve (Builder.io)'s profile picture
Steve (Builder.io)3 years ago

Look at the benchmark links in the blog post, there are multiple. You are reusing keys and not generating unique keys

Sajad's profile picture
Sajad3 years ago

Sweet man an incredible guide about Sets and Map 🙌🏻👌🏻

Evert Junior's profile picture
Evert Junior3 years ago

Your explanations are so good, thank you.

niconiahi's profile picture
niconiahi3 years ago

great content man! appreciate it

Sam Holguin's profile picture
Sam Holguin3 years ago

Shamefully never used Maps or Sets 🤷🏽‍♂️

LegiN 🔴⚫️'s profile picture
LegiN 🔴⚫️3 years ago

When would we use objects ideally then?

Related Videos