I just finished connecting the redux application, and this is fantastic for now. However, since the state is stored in a giant repository, you do not have models that you access with your data.
Let's say I have a model class that stores some user information. Usually I add a function to a class called display_name , which intelligently combines the different parts of their name. At the same time, my different views could just call display_name instead of having to know how to figure them out themselves.
Redux explicitly says not to keep the calculated values ββin a state, so this leaves it definable in the components. However, this may not be right, because then you end up duplicating this code in every component that it needs.
Where is the place to store this logic?
reactjs redux model
Luke sapan
source share