🧠 From Vanilla JS to React/TypeScript: A Developer’s Growth Curve After spending a full month building a project with **Vanilla JavaScript**, I felt confident in my DOM skills, event handling, and clean logic. No frameworks, no abstractions—just raw JS and full control. Then came my next challenge: a new project using **React + TypeScript**. And let’s just say... things got real 😅 One of the biggest hurdles? **ShadCN UI**. 🔧 I ran into: - Type mismatches that broke my build - Conflicting peer dependencies - Styling quirks that didn’t play well with my setup But here’s how I tackled it: - Read through ShadCN’s GitHub issues and docs like a detective - Used `pnpm` to isolate and resolve dependency conflicts - Created custom TypeScript interfaces to bridge gaps - Refactored components to align with ShadCN’s design system 💡 Lesson learned: Vanilla JS teaches you the fundamentals, but frameworks like React/TS demand architectural thinking and patience. And when you add third-party libraries like ShadCN, you’re not just writing code—you’re integrating ecosystems. 📸 I’ve attached screenshots from both projects to show the contrast in approach and complexity. If you’ve ever made the jump from Vanilla to React/TS, you know the struggle. But it’s worth it. #JavaScript #ReactJS #TypeScript #ShadCN #FrontendDevelopment #MERNStack #WebDev #DeveloperJourney #OpenSource #TechInNigeria
From Vanilla JS to React/TS: Overcoming ShadCN UI Challenges
More Relevant Posts
-
🚀 𝐌𝐚𝐬𝐭𝐞𝐫𝐢𝐧𝐠 𝐭𝐡𝐞 𝐍𝐨𝐝𝐞.𝐣𝐬 𝐄𝐯𝐞𝐧𝐭 𝐋𝐨𝐨𝐩 🔄 Node.js, with its single-threaded JavaScript environment, relies on a robust event loop to manage asynchronous operations, like API calls. Let's break down the key components that power this magic: 🔹 1️⃣ Call Stack – The current function that's being executed. 🔹 2️⃣ Microtask Queue – Where high-priority tasks like Promise callbacks wait to run. 🔹 3️⃣ (Macro) Task Queue – Queues up tasks like setTimeout, I/O events, etc. Each iteration of the event loop picks one from here. 𝑯𝒆𝒓𝒆'𝒔 𝒘𝒉𝒂𝒕 𝒎𝒂𝒌𝒆𝒔 𝒊𝒕 𝒄𝒍𝒆𝒗𝒆𝒓: 🌟 Microtasks First Before Node.js goes to the next task in the task queue, it clears out all microtasks. Even new ones added during execution no delays, no skipping! ⏩ One Task Per Loop Each loop iteration executes exactly one task from the macro queue, then goes back to process any pending microtasks. 🔁 Instant Sync If a microtask triggers another microtask—it still gets executed in the same loop cycle. No waiting around! Mastering this event loop flow is essential to building fast, smooth, and responsive Node.js apps. Nail these concepts, and you'll be dancing through async JavaScript with confidence! 👨💻 Image Credit: Nicolas Wagner Follow Gaurav for more such posts :) #NodeJS #EventLoop #AsyncJavaScript #WebDevelopment #LinkedInLearning #InterviewQuestions #JavaScript #FullStackDeveloper
To view or add a comment, sign in
-
-
Front-End Developers: Let’s talk about cleaner code You can spot a good dev and a great dev by one thing — how clean and maintainable their code is. No matter if you’re building in React, Angular, or plain JavaScript, here’s what really made a difference for me: 1. Reuse components ~ Stop copy–pasting. Reusable UI = fewer bugs + faster delivery. 2. Name things clearly ~ If your teammate can’t guess what handleSubmitUser does, you’re doing great. 3. Keep logic out of JSX ~ Your components should render UI, not perform miracles. 4. Manage state properly ~ Avoid chaos early — use hooks, context, Redux, Zustand… but use them right. 5. Test early ~ Catching bugs in tests is way cheaper than catching them in prod 6. Comment with purpose ~ Explain the “why”, not the “what”. 7. Follow DRY & lint rules ~ Let your linter do the boring work for you. Writing clean front-end code isn’t about perfection — it’s about making your work scalable, readable, and future-proof (even for future you). What’s the one clean code habit you always stick to as a Front-End dev? #FrontendDevelopment #ReactJS #Angular #JavaScript #CleanCode #WebDevelopment #DeveloperLife #CareerGrowth #CodeQuality
To view or add a comment, sign in
-
🚀 Why Every JavaScript Developer Should Learn TypeScript If you’re a frontend or full-stack developer working with JavaScript, TypeScript is no longer just an option — it’s becoming a must-have skill. 💡 What is TypeScript? TypeScript is a superset of JavaScript that adds static typing. It helps catch errors during development rather than at runtime — saving you from those painful “undefined is not a function” bugs 😅 ✨ Why developers love TypeScript: 1. Type Safety: Prevents accidental type errors. 2. Better Code Readability: Makes your intent clear for teammates and future you. 3. Powerful IntelliSense: Smarter autocompletion and navigation in VS Code. 4. Scalability: Perfect for large-scale applications. 5. Seamless Integration: Works great with React, Node.js, and modern JS frameworks. 🔧 Example: function greet(name: string) { return `Hello, ${name.toUpperCase()}!`; } A simple type definition like name: string can save hours of debugging later. 💬 In short: TypeScript bridges the gap between dynamic JavaScript and the safety of strongly typed languages — giving you the best of both worlds. 🚀 If you’re aiming for cleaner, more reliable, and scalable code — it’s time to embrace TypeScript. #TypeScript #JavaScript #WebDevelopment #Frontend #React #Coding
To view or add a comment, sign in
-
“Another reason JavaScript is better than TypeScript 🤙✨” I saw this post earlier. Is that true, though? 🤔 Let’s break it down 👇 In the meme: JS shows an error:- “Cannot read properties of undefined” TS shows:- “No overload matches this call” At first glance, it looks like TypeScript is just more complicated. But in reality, TypeScript is saving you from those JS runtime explosions. 🚀 Here’s the truth: - JavaScript lets the error happen at runtime - you find out only when it’s too late. - TypeScript catches it while you’re coding, long before it breaks your app. - The extra words in the TS error? That’s just the compiler giving you the exact reason why it won’t fail later. - In large projects or teams, TypeScript provides type safety, scalability, and confidence during refactors. So yeah… it might look noisy, but that “annoying” TypeScript error is actually your best debugging friend. 😄 JS gives you freedom 🙌 TS gives you security 💪 And honestly, most devs realize - you’ll end up needing both. 💙💛 👉 Follow for more dev insights, frontend tips, and real-world TypeScript learnings! #JavaScript #TypeScript #WebDevelopment #Frontend #DevCommunity #CleanCode #SoftwareEngineering #ReactJS #NextJS
To view or add a comment, sign in
-
-
🧠 5 JavaScript Concepts Every React Developer Must Master If React feels confusing sometimes, it’s usually because of missing JavaScript fundamentals. Here are 5 core concepts that make React click 👇 1️⃣ Destructuring Easily extract props, state, or nested data, clean and readable code. 2️⃣ Array Methods (map, filter, reduce) Used everywhere in React lists, rendering, and transformations. 3️⃣ Closures Understand them, and you’ll understand hooks like useState and useEffect. 4️⃣ Promises & async/await Mastering async code makes API calls and loading states effortless. 5️⃣ The Spread Operator (…) Helps in updating state immutably and merging objects or arrays safely. 💡 Master these, and React stops feeling like “magic.” 👉 Which of these was hardest for you to grasp at first? #JavaScript #ReactJS #FrontendDevelopment #WebDev #LearnToCode #100DaysOfCode
To view or add a comment, sign in
-
-
⚡ The JavaScript Ecosystem — Explained in One Picture! The JavaScript ecosystem is incredibly vast, interconnected, and constantly evolving. This image perfectly represents how almost every modern web technology somehow connects back to JavaScript! 😄 From React, Angular, and Vue to Next.js, TypeScript, Node.js, and React Native — the ecosystem can feel overwhelming at first. But this diversity is exactly what makes JavaScript the backbone of modern front-end and full-stack development. 💡 Key Insight: Master the core fundamentals of JavaScript first — and every framework becomes easier to learn. Once your base is strong, adopting any new JS library or tech is just a matter of time. 🔍 Why It Truly Matters: ✅ JavaScript powers most of the applications we use today ✅ Every major front-end framework and modern tech stack builds upon it ✅ It remains one of the most in-demand and future-proof skills for developers Whether you’re beginning your dev journey or leveling up, investing in JavaScript is one of the smartest career decisions in tech. #JavaScript #WebDevelopment #Frontend #ReactJS #Angular #VueJS #NextJS #TypeScript #NodeJS #ReactNative #FullStackDeveloper #LearningToCode #Programming #TechCareers #DeveloperCommunity
To view or add a comment, sign in
-
-
🚀 Mastering JavaScript Core Concepts! When I first started learning JavaScript, I kept jumping straight into frameworks — React, Vue, Node... But here’s the truth 👉 without mastering the core JS concepts, frameworks won’t make sense. If you’re serious about becoming a real web developer, focus on: 🧩 Closures – how inner functions remember outer scope ⚙️ Event Loop – how JS handles async operations 🪄 Promises & async/await – modern way to write asynchronous code 🧠 Hoisting & Scope – understanding variable behavior 🧱 Prototype & this keyword – for object-oriented JS Once these click, you’ll start thinking in JavaScript, not just coding it. 💬 What’s the one concept that took you the longest to master? #JavaScript #WebDevelopment #Frontend #CodingJourney
To view or add a comment, sign in
-
💭 I was thinking today about why React is always called a library and not a framework... Here’s how I see it 👇 A framework usually has strong opinions — it tells you how to structure your project, where your files should go, and often comes with built-in tools like routing, forms, or data fetching. Think Next.js, Angular, or Vue — everything’s ready out of the box, but you need to follow the rules. React, on the other hand, just gives you the tools and says, “Do whatever you want with me.” 😅 It only focuses on rendering UI and syncing state — everything else (routing, data fetching, state management) is up to you. That’s why it’s more of a library — it doesn’t tell you how to build things, it just helps you build them. Though honestly... with hooks and server components, React is starting to feel a little “framework-ish” these days 👀 What do you think? Is React still a library, or has it quietly become a framework? 🤔 #React #Frontend #JavaScript #WebDevelopment #NextJS #Programming #DeveloperLife #TechDiscussion
To view or add a comment, sign in
-
-
🚀 Why Basics Matter More Than Frameworks Everyone wants to jump straight into React, Next.js, or whatever’s trending. But here’s the truth frameworks are shortcuts built on top of fundamentals. If you don’t understand the road, shortcuts only get you lost faster. I’ve worked with various developers who can build complex UIs but freeze when JavaScript behaves unexpectedly. That’s not a lack of skill, that’s a lack of foundation. When you master the core concepts 🔹 How the DOM actually works 🔹 How JS handles memory, scope, and events 🔹 How CSS paints and reflows 🔹 How HTTP and rendering really connect then any framework becomes just another tool, not a dependency. Frameworks change every few years. Basics stay forever. If you can write clean logic with vanilla JS, you’ll never fear the next big thing. Because the fundamentals never go out of fashion. Stay rooted. Build deep. That’s how you become better developer. #frontend #javascript #developers #careergrowth #learning
To view or add a comment, sign in
-
-
JSX made React click for me, and here's why? When I first saw JSX, I'll be honest – it looked weird. HTML inside JavaScript? My brain said "no way." But once I got past that initial confusion, everything changed. Here's the thing about JSX that nobody tells you upfront: it's not trying to mix HTML and JavaScript. It's giving you the power to describe your UI exactly where you need it, with all the logic right there. Think about it. Before JSX, we were either writing clunky template strings or separating our markup so far from our logic that we lost track of what was happening. JSX brings it all together. A few things I wish I knew earlier: It's just JavaScript - Those curly braces aren't magic. They're just JavaScript expressions. Want to show a user's name? {user.name}. Need conditional rendering? {isLoggedIn && <Dashboard />}. It's intuitive once you get the rhythm. Components are reusable UI - Writing <Button /> instead of copying button markup everywhere changed how I think about building interfaces. It's like creating your own HTML tags that actually do what you need. The errors actually help - Unlike vanilla JavaScript where you might not catch UI bugs until runtime, JSX catches a lot of mistakes during compilation. Forgot to close a tag? You'll know immediately. My biggest mistake? Fighting against JSX instead of embracing it. Once I stopped trying to separate everything into different files and let the component be the single source of truth, my code got cleaner and my bugs decreased. If you're learning React and JSX feels strange, stick with it. That moment when it clicks is worth it. What was your experience learning JSX? Did it feel natural or take some getting used to? #React #JavaScript #WebDevelopment #Frontend #JSX #CodingJourney
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development