React: I'm struggling to understand the point of passing a state from one component to another

Hi there,

I am confident I understand the functionality of React now (I may be wrong), however, I really do not understand the point passing a states property to the props of another component?

Wouldn’t it be much easier to just copy or cut that states property and paste it in the state of the component you are passing the props to?
Why all this jumping around from file to file trying to find the file for which came from?

Obviously I’m clearly missing something, but it seems pointless and messy to me at the moment. Maybe I’ve not done a project big enough to understand the purpose fully yet.

Have you tried that? Sometimes the best way to learn is to try things and see if they work.

Yes it can get messy, which is why several alternatives have been developed to work around the mess. FCC has a whole section on one of them (i.e. Redux).

1 Like

I’ve come across some information regarding ‘Separation of Concerns’ in relation to React. It all makes a lot more sense now! Thanks