Aller au contenu principal

Lift state only to the common owner

Choose the closest common parent as the owner for state shared by sibling components.

react-basics5 min read

Accordion renders three Panel children. Only one panel may be open at a time. Clicking a panel header should close the old panel and open the clicked one.

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Nous contacter