Suppose you create an application that displays data about movies that you receive from the server in this format:
{ movies: [], actors: [], directors: [], years: [] }
Different arrays are connected to each other via ids. In other words, the object in the films is as follows:
{title: 'The Shining', cast: [`837392010`, `363893920` ...], ...}
Each of these identifiers in a cast array is a reference to an actor in an array of actors.
You put the data as it is in the redux repository, but different components must use it in different ways. For example, one component needs to list all the films that Jack Nicholson was in the 1970s, although the array of years is not directly related to the actors. These are just links to films that are themselves associated with the actors. Therefore, before a component can render, it needs to run a bunch of data transformations.
Another component lists all the times when Martin Scorsese and Robert Dinero worked together, others list all the films with βFireβ in their names, the other lists all the films that Tom Hanks was between 1990 and 2000 ...
, , . .
, . - .
, , ? :