Often, you want to store a list of items retrieved from your backend inside the Redux state tree. … You have two options for storing these. Either you store them inside an object where each key is the activity id and the value the activity, or you store them inside a list where each item is an activity.
There’s also a third option, using an OrderedMap from Immutable.js. This has the advantages of both options that they describe in the next paragraph – retrieval is O(1), and the items are ordered. However, it adds the disadvantage that storing a new item is amortized O(log N) instead of O(1).
Has anyone tried using OrderedMap for this? Did it work out?