Currently, I'm exploring the best strategy for managing lists in my Redux Store. The current structure is as follows:
Store = {
users: [],
posts: [],
lists: [],
}
My concern lies with the 'lists' array. It essentially serves as a storage for paginated lists of specific resources. For example:
lists: [
{
id: 'users/43/posts',
items: [25, 36, 21]
}
]
The 'id' here corresponds to the URL, allowing the component to easily retrieve and display the appropriate list. However, someone has cautioned me that this may not be the most optimal approach. They suggested an alternative method like so:
users: [{
id: 2,
posts: [
{
url: 'users/2/posts',
items: [13, 52, 26],
}
]
}]
I am puzzled about how Redux will determine where to store this list. Would I need to specify the destination within the action arguments?
Your insights would be greatly appreciated.