JavaScript React Components Managing State and Data Flow Controlled Components

Stateful vs Stateless Components

Hey there! I really need to know when to use stateful components and when not to.

1 Answer

Clayton Perszyk
Clayton Perszyk
Treehouse Moderator 46,608 Points

You use stateful components as a wrapper for stateless components. All changes to state (data) happen in stateful components and the state then propagates to stateless components.

Thank you @Clayton Perszyk.