I'm trying to figure out a good structure to create a many to many relationship in Redux. For this example we have images (which can have multiple tags) and tags (which can have multiple images).
Is this a good way to structure it in Redux?
images: {
1: {
title: "A bunch of hills"
},
2: {
title: "Hiking in a forest"
}
},
tags: {
1: {
title: "landscape"
},
2: {
title: "outdoors"
}
},
imagesTags: {
[
image: 1,
tag: 1
],
[
image: 1,
tag: 2
],
[
image: 2,
tag: 2
]
}
It does mean I have to create a separate reducer which messes with my modular structure but I guess that is always going to be the result of having related reducers.