DEV Community

Cover image for Why does React exist?
Rakib Hassan
Rakib Hassan

Posted on

Why does React exist?

Nobody told me this when I started React.
I learned useState. I learned useEffect. I built stuff. It worked.
But I had no idea why React existed. I thought it was just what everyone was using. So I used it too.
That gap cost me.
I was working on a client project — a dashboard with a notification count, a sidebar, and a data table. All three needed to reflect the same data. When something updated, I was manually hunting every place in the UI that cared about it and updating each one.
Miss one? Bug. Update the wrong one first? The UI shows two different things at once. Add a new feature that touches the same data? Start praying.
I thought I was bad at React.
I wasn't. I was just doing exactly what React was built to stop people from doing.
Turns out the Facebook engineering team had the exact same problem — just at a scale that was actually breaking their product. Message counts. Notification badges. Chat threads. Dozens of pieces of UI all depending on the same data, all being updated manually by different engineers.
So someone asked a different question: What if you stop thinking about updating the UI — and start thinking about describing it?
Don't say "when this changes, update that." Say "when data looks like THIS — the screen should look like THIS."
Let the system figure out what needs to change. You just describe the outcome.
That's React. That single idea is the whole thing.
Once that clicked, building complex UI wasn't about fighting the DOM anymore. It became about designing predictable, bug-free data architectures.
This is exactly why the enterprise dashboards and B2B platforms I build today don't break when a new feature is added. You don't manage the UI; you manage the state.
Master the concept, not just the API.

Top comments (0)