React passing data between siblings

Publié le: 22 octobre 2020
sur la chaîne: React with Masoud
50,833
790

In this tutorial, you will learn how to pass data between siblings components without using any third-party library.
In React you can pass state as props to the child components but you cannot pass state between sibling components.

The best solution for this can be wrapping both siblings in a parent component and handle the state inside the parent component. Then you easily can share the state between any siblings that you want and use the state inside the child components.

Hope you enjoy it!
You can download the project source code from here: https://pezeshkzade.com/blog/source-c...


Sur cette page du site, vous pouvez voir la vidéo en ligne React passing data between siblings durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur React with Masoud 22 octobre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 50,833 fois et il a aimé 790 téléspectateurs. Bon visionnage!