ReactJS Tutorial

Difference between React Presentational and Container Components

Table of Contents

  • What is Presentational and Container Components in ReactJS?
  • Presentational vs container components in React Comparison

What is Presentational and Container Components in ReactJS?

In React, components are often divided into 2 major categories: presentational components and container components.

Each of these categories have unique features. While the presentational components are mostly concerned with generating some markup to be outputted, container components are mostly concerned with the backend operations.

Presentational Component Example:

const Users = props => (

    {props.users.map(user => (

  • {user}

    ))}

)

Presentational vs container components in React Comparison

Presentational vs container components in React Comparison

Did you find this article helpful?