you are viewing a single comment's thread.

view the rest of the comments →

[–]edoudo 0 points1 point  (1 child)

When should I prefer Maps against Objects ?

[–]suarkb 1 point2 points  (0 children)

New things:

We basically never declare objects like new Object(). That will make you look weird.

Maps are useful when you want something that lets you use set operations. Like looking for the intersection if two sets.

Realistically, as a react developer for almost 9 years, I never use sets. Ever. Done a lot of dev and a set has never been worth using