Introduction
Sometimes a component needs to do different jobs when it changes. Using multiple effects helps keep these jobs separate and clear.
When you want to fetch data from a server and also listen to user input changes.
When you need to update the document title and also log something to the console at different times.
When you want to run one effect only once when the component loads and another effect every time a value changes.