Comrades, I ask for help!
There was such a problem in the formation of the structure of the reducer and the state as a whole.
Take, for example, adding news to the site: The news has immediate data - the title, content (content), metadata.
But the news also has pictures, tags, categories.
It is clear that the site in addition to the news will be a bunch of entities.
And here the question arises - to divide the reducer as much as possible (news, uploads, categories, tags) and then collect all this in a component from different parts, but everything is nice and structured, or make a reducer for the news and include all these fields in it right away. bother, then collecting everything from one part of the state.
Tell me how to do more often. How is more correct? I know it quite recently with the reactor and the redox, so it’s difficult to somehow decide for yourself.
newsentity into separatetext, uploads, categories, tagswould make sense. Received anewsItemobject with these fields, updated the state. What is the point of separating the loading of a picture and a text on the level of a global state? - Alexandr Tovmach