so I'm kinda into React and I've been using both function and class components and I was wondering, what's the true difference between them? When should you use either of them? Are hooks more powerful and effective than class methods? Any answers would be appreciated, thanks!
Asked
Active
Viewed 58 times
2
-
1Start here: https://reactjs.org/docs/hooks-faq.html#what-can-i-do-with-hooks-that-i-couldnt-with-classes – Jan 10 '21 at 14:41
-
Check the FAQ section in DOCS – Dennis Vash Jan 10 '21 at 15:00
1 Answers
0
To be honest, the fact that matters is the project. If project is big, I would rather go with class, because it's already used a lot and easy to find bugs, but hooks are really nice way to optimize code. it takes less space, but I had a moment when I could't get rid of a bug, so I had to change it to class component.

Eleniko
- 96
- 10