3 ms·
I have mixed feelings about this - partially because a so called “UI State” stores relations between types. Flat stores are a lot like simple tables. I’ve yet t
by catchmeifyoucan 7y ago
I have mixed feelings about this - partially because a so called “UI State” stores relations between types. Flat stores are a lot like simple tables. I’ve yet to be convinced one approach is superior to the other. I agree with container components and it’s the containers job to shape the data. In theory if we had M projects and N tasks - we’d have to perform M*N lookups to get project names for each task.
Most client applications don’t expect a million records, and in the grand scheme either approach might not matter; however, maintaining object relations gives us a clear overview of how data links together, making it easier to debug and demystify.
- catchmeifyoucan 7y agofor the example provided by the author - one way without redesigning is perhaps adding a timestamp to the data and adjusting the container component to return sorted results by time added may yield the expected results.