GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 23 von 28 · Flussdiagramm

React siblings components

Kostas Diakogiannis

Connecting siblings components

What if we want to pass data through components who are siblings? And not parent and children? Then the solution is to initialize and maintain state to a common parent component of both siblings.

Since they are siblings, they should share a parent component! Then they can both have access to the state of the parent component, passed as props.

Already confused? Let’s see an example!

 

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck