React vs Vanilla JS: Day 42 of 100

I tried to build a To-Do app in vanilla JS once. It was many lines of chaos. Today in React — it was 4 clean components. Day 42/100 — I just entered the React world, and I already can't imagine going back. Here's what I learned on Day 1 of React: 🔹 Components are just functions that return UI : That's it. No magic. Once this clicked, React went from intimidating to logical in minutes. 🔹 Class vs Function components : Class components are still out there ; you'll see them in older codebases. But function components are cleaner, simpler, and where React lives today. 🔹 Exporting components : Named export vs default export. Sounds trivial. Costs you some minutes the first time you get it wrong. Now I know why it matters. 🔹 Dynamic & Reusable components : Pass different props and get different output. One component, infinite uses. This is the moment vanilla JS started feeling like a lot of unnecessary work. The To-Do app I built today? Same app. Completely different experience. Vanilla JS: event listeners everywhere, DOM manipulation etc React: 4 components, each doing one job, each making sense on its own. If you've been putting off learning React — don't. The learning curve is real, but Day 1 already feels worth it. Day 42 done, 58 to go ! #100DaysOfCode #ReactJS #MERNStack #WebDevelopment #LearningInPublic #JavaScript #BuildInPublic

  • graphical user interface, text

To view or add a comment, sign in

Explore content categories