← React Intermediate Questions - Set 3 Q29

What are compound components in React?

React Intermediate Questions - Set 3

Example

<Tabs>
  <Tabs.List><Tabs.Tab>One</Tabs.Tab></Tabs.List>
  <Tabs.Panel>Content</Tabs.Panel>
</Tabs>
// Tabs shares state with its children through context

What to notice

← Back to the question list