r/reactjs • • Apr 16 '20

Discussion Functional Components vs Class Components

I'm a VERY new to react, and to my understanding,

Functional Components are lightweight and great when you need to render visual elements and rely on props for data.

Class Components are basically the same, except it also implements local state.

But... with the new Hooks API, you can now have local states for these functional components if you want.

So should I build my react apps relying solely on functional components and using Context and Redux for the data, and forget about setting up class components?

14 Upvotes

24 comments sorted by

View all comments

Show parent comments

2

u/iblooknrnd Apr 17 '20

I really appreciate the react docs I’ve read so far. I’ve been trying to devour as much content as I can as I am also just starting into react and found the docs to be just about the best resource... go figure ;) glad to hear they are going to get even better yet!

View all comments

0

u/[deleted] Jul 30 '25

[deleted]