DEV Community

Discussion on: When You Should Use JavaScript Maps over Objects

thewix profile image

Should also note that Map operations are not immutable. Set will alter the existing Map rather than creating a new one. This has implications if you plan on using Map in something like Redux state, or functional programming. You'll need/want to write your own operations that do this for you, which may not be performent.