Sep 16, 2024
Hi Ala
Thanks for your thoughts! I don't 100% agree. Sometimes the logic inside of the effect is also quite long and might not be relevant for someone who takes a look at the component.
Then it definitely makes sense to put the effect into a custom hook. The positive advantage of the custom hook is that you can give it a declarative name which makes your component more readable.