State as array of objects vs object keyed by id
问题 In the chapter on Designing the State Shape, the docs suggest to keep your state in an object keyed by ID: Keep every entity in an object stored with an ID as a key, and use IDs to reference it from other entities, or lists. They go on to state Think of the app’s state as a database. I'm working on the state shape for a list of filters, some of which will be open (they're displayed in a popup), or have selected options. When I read "Think of the app’s state as a database," I thought about