React Components, Explained by a Litter-Pick Organiser
Confession: when the developers on our app testing calls started talking about "components", I nodded along and understood nothing. I organise litter picks and volunteer rotas, not code. But after a few evenings of asking a lot of questions (thank you for your patience, everyone!), it clicked, and it turns out I already work this way. So here are React components, explained the way I wish someone had explained them to me.
Templates you reuse
A component is a small, self-contained piece of the screen: a button, a profile card, a comment box. You build it once and use it everywhere. It's exactly like the sign-up sheet I made for our very first clean-up. I've reused it for every event since and only change the date and the meeting point. The developers say that's a big reason React apps come together quickly: nobody rewrites the same thing twice.
One job each
Good components do one thing and do it well. On a clean-up day, one volunteer handles registration, one hands out gloves and bags, one gives the safety talk. When registration goes wrong, I know exactly who to ask. Code works the same way, apparently, and it makes testing and fixing things much easier.
Boxes inside boxes
Components nest inside each other. A page holds a feed, the feed holds posts, and each post holds a like button and a comment box. Our events work like that too: the event has teams and the teams have volunteers. Once I drew it out on paper, the whole app made a lot more sense.
Information flows one way
In React, data passes down from parent to child, and a child can't quietly change its parent. That sounded strict until I compared it to how I brief team leads: the plan comes from the coordinator, and nobody rewrites the master list from the back of the line. When something goes wrong, you trace it back up the chain instead of hunting everywhere.
That's my non-developer tour! If you're another "not technical" member helping test the app, I'd love to hear which comparisons worked for you. Next I want to get my head around the virtual DOM, whatever that is, so wish me luck.
Info
html
asdasdasd