Presentational and Container Components — Medium

Presentational and container components: What's the difference? #ReactJS

  • Both presentational and container components can contain other presentational or container components just fine.
  • ** In an earlier version of this article I claimed that presentational components should only contain other presentational components.
  • When you notice that some components don’t use the props they receive but merely forward them down and you have to rewire all those intermediate components any time the children need more data, it’s a good time to introduce some container components.
  • Functional components are simpler to define but they lack certain features currently available only to class components.
  • Presentational components can be stateful, and containers can be stateless too.

Read the full article, click here.


@ReactiveConf: “Presentational and container components: What’s the difference? #ReactJS”


You’ll find your components much easier to reuse and reason about if you divide them into two categories.


Presentational and Container Components — Medium