Maintaining Order in Immutable.js Objects

InstructorJ.S. Leonard

Share this video with your friends

Send Tweet

Immutable.js's Map doesn't promise iteration order after a set() operation. When we need a guarantee for iteration order, we can use OrderedMap. This comes at a slight performance cost, or for you computer science people, it is amortized at an unstable O(log32 N). Let's explore ordering.