Checking Out React!

5 min read

So, here I am, checking out React. It’s kind of funny because I still remember back in 2022 when I was stuck in this loop of searching for hours on end, trying to figure out what framework to learn. Should I go with React? Or should I dive into Vue? I spent so much time just thinking about it, reading articles, and watching tutorials, but in the end, I chose Vue.js. Fast forward to 2024, and now I’m diving into React—not because I’m bored of Vue or anything, but because I’m exploring new things.

The main reason I decided to give React a go is because I was searching for a good UI library for my Rust-based cross-platform framework. And after some deep dives, I found a ton of React libraries that are really well-designed, with minimal bugs and a solid structure. The key takeaway here is React has a huge user base, which means the ecosystem is far richer compared to other options. I didn’t want to waste time reinventing the wheel, so React seemed like a great choice for the job.

But here’s the kicker: while I was looking at React and its ecosystem, I couldn’t help but feel like the design decisions in React are a bit… wild. When I compare React to Vue.js, it feels like Vue just has this more intuitive and thought-out design that I can vibe with better. React’s way of doing things feels a bit all over the place, and the decisions you have to make as a developer are just… so different.

So, I spent about two days just diving into the basics of React, trying to wrap my head around how things work. And let me tell you, it’s different—really different from Vue. But I’m not complaining, it’s just that React’s approach is so unique. So, what I’m gonna do now is compare these things with Vue, especially in terms of how things are structured, how components work, and just how the overall developer experience feels. Alright, let’s dive into it. So, after spending a couple of days with React, here’s what I think.

Structure:

First off, Vue’s structure is something I’ve gotten really used to. Vue has this clean separation with template, script, and style. It’s super intuitive---everything is organized, and it feels like Vue does most of the heavy lifting for you. You define what you need, and Vue just does it with minimal configuration. React, on the other hand, is a bit less opinionated. Everything is inside a component, and there’s no enforced separation like in Vue. The JSX syntax mixes everything---HTML, CSS, and JS---into one. It feels a little more flexible but also a bit chaotic at times, especially when I’m used to the neatness of Vue.

Components:

When it comes to components, Vue has this awesome single-file component format. It’s just nice to have everything in one place, and Vue’s reactive system makes it easy to manage state and props. In React, you still deal with components, but the way state is handled is a bit more hands-on. React’s hooks system is cool, but it feels a bit more verbose compared to Vue’s data() and computed(). I had to get used to useState and useEffect---they’re powerful, but I miss the simplicity of Vue’s reactivity system.

Developer Experience:

In terms of developer experience, Vue has this super smooth flow. The CLI tools, the documentation, and the integration between Vue Router and Vuex feel almost too easy. With React, there’s a bit more setup. You have to choose which libraries to use for routing (React Router), state management (Redux, Zustand, etc.), and so on. React gives you flexibility, but sometimes that’s more overwhelming than helpful, especially when you’re just trying to build something quickly.

Ecosystem:

Now, let’s talk about the React ecosystem. I can’t deny it---the React ecosystem is huge. There are libraries for everything. From UI components to state management, React’s ecosystem is packed with tools that save you time and effort. Vue’s ecosystem is growing, but it still doesn’t have the same scale. React’s got that advantage if you’re looking for a variety of options or need something specific.

Performance:

Vue’s reactivity system is super efficient. It does a lot of behind-the-scenes work, and it just feels fast. React also has solid performance, but in my experience, it requires a bit more manual optimization in larger apps. Vue just feels like it does the right thing without you needing to tweak it too much.

OK, that’s it!