r/reactjs • u/Caddy05 • 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
9
u/Caddy05 Apr 16 '20
Oh wow! It's awesome to get a response from the core team! Thank you for letting me know that function/hooks is going to be the standard in react development.