Hello everyone, I loved the Ultimate Redux Course, but one thing that I didn’t find is: How exactly should we handle getting single entity from the API (instead of the whole list).
For example, If someone opens the website with an address, directing to specific entity: foobar.com/users/1, should I get the whole list of users and then select user #1 or should I request only this one entity?
If the later, if I request only one entity, should I add it to the list or should I have a different place in the store for it? like, “displayedEntity”? Like this:
entities: {
users: {
list: [],
loading: false,
lastFetch: null,
displayedEntity: null
},
}
Thanks for help