1/3 lessons33%

What Is React and Why Do Developers Swear by It?

If you’re like me, you probably heard about React long before you ever used it. People wouldn’t shut up about it. “It’s just JavaScript!” they said. “It’s component-based!” “It’ll change your life!” Naturally, I avoided it like the plague. But once I gave it a shot—and actually stuck with it—it clicked. Not immediately, but loud enough to shift how I approached building user interfaces. This isn’t just a library. It’s a philosophy wrapped in JavaScript. Let’s unpack what makes React the go-to tool for frontend developers (and why it took me three tries to actually get it).

React? It's Not Just a Library — It’s a Mindset

React isn’t trying to be everything. It’s not a framework. It won’t tell you how to fetch data or handle routes out of the box. That’s not a flaw—it’s the point.

React’s real power is how it encourages you to think about building UIs. Instead of gluing together jQuery scripts or manipulating DOM nodes manually, React wants you to describe what the UI should look like at any given state, and let it handle the “how.”

It’s declarative. Not in a fluffy-marketing way. In a very real “I don’t want to debug a dozen classList toggles at 2AM” way.

Components: Little UI Lego Blocks (But Smarter)

Once I wrapped my head around components, I couldn’t go back.

In React, everything is a component—your header, your login form, even that “retry” button you keep forgetting to disable. Each one is a function that returns JSX, and you can nest them like Russian dolls.

What blew my mind? Reusability. You build a piece once, then reuse it across your app. Sure, you could do this before, but React makes it feel native. Intuitive. Dare I say... fun?

I once wrote a React component called Button.js and reused it across a dashboard, admin panel, and marketing site. One component. Three contexts. Zero regrets.

Reuse or Rebuild? React Has a Strong Opinion

React wants you to reuse components—not rewrite them every time with minor tweaks. That’s why props exist. You pass in data, and the component behaves differently without needing to change its internals.

It’s like passing mood swings into your UI.

Need a red button instead of blue? Pass a variant prop. Need to disable it? Pass disabled={true}. The same logic applies from your tiniest icon to your biggest form.

It’s also why so many React codebases feel clean when done right. You’re not repeating yourself—you’re composing your UI like a system of gears.

Real Talk: Why I Didn’t “Get” React at First

Let’s be honest. My first experience with React was a mess.

I opened a Create React App project, saw useState, props, JSX, and immediately noped out. “Why does this look like HTML but act like JavaScript? And what the hell is a hook?”

The second time, I copied code from Stack Overflow until the app barely worked. Still didn’t get it.

It wasn’t until I wrote my own component from scratch—just a simple counter with useState—that it clicked. I saw state update the UI without any DOM manipulation. I didn’t have to document.querySelector() a thing. That’s when I realized: this isn’t like other frontend tools. And it rewards you for learning it deeply.

Why React Took Over the Frontend World

React didn’t win because it was the first. It won because it solved real problems.

Before React, frontend development was like trying to choreograph 10 dancers blindfolded—every change to the UI had side effects you had to manually clean up. React said: “What if we just... rerendered everything?”

It sounded absurd. But thanks to the virtual DOM, it was fast. It abstracted away the messy bits and gave developers a reliable mental model.

Combine that with a massive ecosystem (React Router, Redux, Next.js), corporate backing (Facebook), and a passionate community, and you've got a tool that’s been leading the pack for over a decade.

But… Is React Always the Best Tool?

Short answer? No.

React is great, but not perfect. There are times when it's overkill—like static sites where a simple templating engine would do. And let’s not pretend hooks didn’t come with their own learning curve (hello, useEffect dependency arrays).

Other tools like Svelte and SolidJS are challenging React’s dominance with compelling alternatives. If I’m building a one-off landing page? I might reach for Astro or plain HTML/CSS. No shame in that.

React shines in complex, interactive UIs—where components need to talk to each other, state needs to flow smoothly, and you want long-term maintainability. That’s its home turf.

In the next lesson, we’ll pop the hood and look at how React actually works. We’ll talk virtual DOMs, diffing algorithms, and how React updates the UI without frying your CPU. Check it out: How React Works Behind the Curtain.