September 2018
Intermediate to advanced
302 pages
7h 17m
English
It may be tricky to see the benefits of the previous refactor. Some of these refactors shine only days after you make them. Take, for example, the need to re-fetch the tasks on a given event. This event happens in a completely different part of the app and is not connected to the task list. In the naive implementation, you would need to deal with the update process and keep everything up to date. You would also need to expose a fetch function to another component. This would tightly couple those two. Disaster. Instead, as you can see, you would likely prefer to duplicate fetching logic to the second separated component. Again, you would end up with code duplication. Therefore, you would create a parent service ...
Read now
Unlock full access