正在加载视频...

视频加载失败

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,270 次观看 • 3 年前 •via X (Twitter)

10 条评论

Steve (Builder.io) 的头像
Steve (Builder.io)3 年前

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

Jamie Kyle is on 🦋 的头像
Jamie Kyle is on 🦋3 年前

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

Anonymous Sentinelæ 的头像
Anonymous Sentinelæ3 年前

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 的头像
Random3 年前

Please check this

Steve (Builder.io) 的头像
Steve (Builder.io)3 年前

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

Sajad 的头像
Sajad3 年前

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

Evert Junior 的头像
Evert Junior3 年前

Your explanations are so good, thank you.

niconiahi 的头像
niconiahi3 年前

great content man! appreciate it

Sam Holguin 的头像
Sam Holguin3 年前

Shamefully never used Maps or Sets 🤷🏽‍♂️

LegiN 🔴⚫️ 的头像
LegiN 🔴⚫️3 年前

When would we use objects ideally then?

相关视频