I want to learn some react. How can I start? I have to create components. Then I have to pass data through these components. Import-export, export-import blah blah blah….. then I have to gather all the components in App.js. Yeah, this is App.js and this is called the parent component. Ok fine. I do understand. And all the components you gathered before are called child components. Ok, this is also fine. There is nothing not to understand this. Then I have to do something so that the components can interact between them. What was that??? Ok, there is something like props. What is this?? This accepts the data as an object sent by other components. Awesome, so this is a communication system between children I mean components. What can I do if I have to handle data change inside a component?? Well, there is something like state. This means if something repeatedly changes within a component itself, then I have to declare a state. There will be a state variable, a function inside an array and I have to call a hook named useState. So basically the difference between props and state is that props can handle outside a component and state can handle inside a component. Then I have to manage the state. This is super easy. I am now a boss in passing data from components to components. Wait wait, how long will this props help you???? If you have many children??? how will you handle them??? And props will fail to do that if I have multiple components. It will be a boring task if I pass data from components to components by props. A child component receives data from parent, a child component can send data to the parent component, not only that but a child component has to send data to another child, send-receive-send what the hell!!! Ok then what can I do now???

Read this article on Medium