October 2017
Intermediate to advanced
280 pages
6h 50m
English
Now, we will describe the OnPush change detection strategy. It is extremely useful when the result that the given component produces depends only on its inputs. In such cases, we can pass an immutable data to its inputs in order to make sure that it will not be mutated by any component. This way, by having a component that depends only on its immutable inputs and doesn't produce any side effects, we can make sure that it produces different user interfaces only once it receives different inputs (that is, with different references).
In this section, we will apply the OnPush strategy to the TodoList component. Since it depends only on its inputs (the todos input), we want to make sure that its ...
Read now
Unlock full access