...

/

What are Compound Components?

What are Compound Components?

Compound components in React are components that are composed of two or more separate components.

We'll cover the following...

Introduction

The first pattern we will consider is called the Compound Components pattern. I know it sounds fancy, but I’ll break it down.

The keyword in the pattern’s name is the word Compound.

Literally, the word compound refers to something that is composed of two or more separate elements.

With respect to React components, this could mean a ...