I prefer to use hooks. For me hook is like Controller of some feature. With hook it looks easier to share any code between any components. Also, with hooks I’m able to start write business logic earlier than I did that with Redux before. I haven’t use classes for a year and didn’t have any problems. Just one issue that I had with hooks is that when I use API requests, then I can do something wrong and get two requests just because I used hook twice in different components. Contexts solve this but for me it’s challenging to keep in mind this 😄 Hope that I’ll never get same requests again and again
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I prefer to use hooks. For me hook is like Controller of some feature. With hook it looks easier to share any code between any components. Also, with hooks I’m able to start write business logic earlier than I did that with Redux before. I haven’t use classes for a year and didn’t have any problems. Just one issue that I had with hooks is that when I use API requests, then I can do something wrong and get two requests just because I used hook twice in different components. Contexts solve this but for me it’s challenging to keep in mind this 😄 Hope that I’ll never get same requests again and again