React Function Components vs Class Components
As a web-dev noob is there a big difference in performance, safety, cleanliness, etc? What should I use and why if using create-t3-app? It seems like the negatives from theo's useEffect rant can be mitigated by class components?
4 Replies
Always use functions components. There are better in almost every way
Thanks. So reasons are performance and boilerplate/cleanliness for the most part?
I don't think there is a performance difference. Function components are more flexible and clean. Also, they are the standard now, so all docs, libraries, etc. assume you use function components.
Awesome, thanks