## DAY 23 — React To-Do App (Rebuild) Day 23/30: I rebuilt my Day 20 To-Do List in React. Same features. Completely different experience. Vanilla JS version: 200+ lines of DOM manipulation, querySelector everywhere, manual state tracking. React version: clean components, useState for state, props for data flow, and the UI just updates when data changes. No more document.getElementById. I finally understand why React exists. Not because someone explained it — because I built the same thing twice and felt the difference. The code is cleaner, more organized, and I could add new features in minutes instead of hours. 🔗 Live: https://lnkd.in/gWYqnKGu 🔗 Code: https://lnkd.in/g3S9JDnt #30DaysOfCode #React #JavaScript #WebDevelopment #BuildInPublic #WomenInTech
Rebuilding To-Do App in React: Cleaner Code, Easier Development
More Relevant Posts
-
You don't need Redux for most React apps. There, I said it. Redux is powerful, but it comes with boilerplate that slows you down. For the majority of projects, React Context combined with useReducer gives you everything you need. Here's a simple example: const [state, dispatch] = useReducer(reducer, initialState); Wrap your components with a Context Provider, pass down state and dispatch, and you're done. No extra libraries, no middleware setup, no configuration headaches. This pattern works great for: - Auth state - Theme toggling - Shopping cart logic - Form management Redux still shines for large-scale apps with complex state interactions or when you need powerful dev tools and middleware like Redux Saga. But if you're building a mid-size React or even a Node.js/ASP.NET-backed frontend, keep it simple first. Don't over-engineer early. Add complexity only when the problem demands it. Are you still using Redux in smaller projects, or have you already made the switch to Context + useReducer? #React #JavaScript #WebDevelopment #Frontend #NodeJS #DotNet
To view or add a comment, sign in
-
1,000+ installs later. MASSIVE I’m looking at the dashboard for React Next JS Smart Snippets and honestly, I’m thinking back to where this started. It wasn't a "grand plan." It was pure frustration. I was tired of being stuck with the same problem: standard snippets just weren't "smart" enough for the modern Next.js App Router. You know the drill. You create a page.tsx inside a folder named /community. Most extensions just give you a component named Page. I hated that. I wanted it to be CommunityPage. Automatically. Without me having to manually rename it every single time. Consistency is the heartbeat of a clean codebase, and I felt like I was constantly fighting my tools to get it. Then there were the other gaps: Why were arrow functions and normal functions always lumped together? Why did I have to go find a library or snippet for a simple slugify or case converter? Why was setting up a Theme Provider in Vite or Next.js still a multi-step chore? So, I built the tool I needed. I didn't know if anyone else cared about these "tiny" friction points. But 1,000 installs later, it turns out I wasn't alone in wanting a better workflow. To every developer who downloaded it: Thank you for trusting my "annoyances" 😅 enough to make them part of your setup. We’re just getting started. If you’re still fighting with generic Page components, the link is in the comments. 🛠️ #ReactJS #NextJS #VSCode #DeveloperExperience #OpenSource #BuildInPublic #SoftwareEngineering
To view or add a comment, sign in
-
-
Should you store secrets in .env for frontend apps? 🤔 Many developers think .env files are secure. But in frontend applications, that’s not true. ❌ Why you shouldn’t store secrets in frontend .env In frontend frameworks like React, Vite, or Next.js, environment variables are embedded into the build. This means they become part of the JavaScript bundle sent to the browser. Anyone can inspect them using DevTools or source files. So .env hides values from your code repository — not from users. 🧩 Example const apiKey = import.meta.env.VITE_API_KEY; After building the app, it becomes something like: const apiKey = "abc123secret"; Now this value exists inside the compiled JavaScript file. Anyone can open DevTools → Sources and find it. 🔒 Better solution Keep sensitive data only on the server. #WebDevelopment #FrontendDevelopment #JavaScript #ReactJS #WebSecurity #CleanCode #SoftwareEngineering
To view or add a comment, sign in
-
-
Modern React development is focused on performance visibility. And I found one interesting tool - React Scan https://react-scan.com/. It’s a lightweight tool that automatically detects performance issues in your React app — without requiring complex setup or deep profiling knowledge. It automatically tracks things like: - unnecessary re-renders - component update frequency - inefficient component structures Example usage: - CLI (no code changes) npx react-scan@latest http://localhost:3000 - Script tag <script crossOrigin="anonymous" src="//https://lnkd.in/evfJKd8f"></script> - NPM integration npm install -D react-scan For modern React development — especially in complex apps — it’s a huge productivity boost. #react #frontend #webdev #performance #javascript #reactjs
To view or add a comment, sign in
-
🚀 Day 948 of #1000DaysOfCode ✨ Setting Up Redux in Next.js (The Right Way) State management in modern apps can get messy — especially when you’re working with frameworks like Next.js. In today’s post, I’ve shared a clean and practical setup of Redux in a Next.js application, so you can manage global state without confusion. From configuring the store to integrating it properly with your app structure, this setup ensures everything works smoothly with both client and server rendering. I’ve also focused on keeping the setup scalable, so you’re not just making it work — you’re building it the right way from the start. If you’re building real-world React or Next.js applications, understanding this setup will save you a lot of time and headaches later. 👇 What’s the most confusing part for you when setting up Redux in Next.js? #Day948 #learningoftheday #1000daysofcodingchallenge #FrontendDevelopment #WebDevelopment #JavaScript #React #Next #CodingCommunity #Redux #CodingCommunity
To view or add a comment, sign in
-
Most React apps don’t become slow because of React. They become slow because of how we use it. Here are some common mistakes I’ve noticed 👇 ❌ Keeping too much state in one component ❌ Unnecessary re-renders due to poor structure ❌ Passing new objects/functions every render ❌ Ignoring memoization completely ❌ Fetching data again and again without caching And the worst one: ❌ Not understanding why something is re-rendering React is fast by default. But without understanding how it works, we end up creating performance issues ourselves. 💡 Small improvements that actually help: • break components into smaller pieces • use React.memo wisely • avoid unnecessary state • use tools like React DevTools Profiler You don’t need advanced tricks. Just understanding the basics deeply is enough. 💬 What’s one React issue that took you a long time to figure out? #ReactJS #FrontendDevelopment #JavaScript #WebPerformance #SoftwareEngineering #DeveloperLife #CodingTips #WebDevelopment
To view or add a comment, sign in
-
Today was about stabilizing the "front door" of the app: the Login flow and its connection to Redux. TrackMate needed a reliable way to move from a successful API response to a fully authenticated state that persists across app restarts. Refined the Login Thunk → mapped backend data directly to the Redux state. Fixed Keychain storage crash → ensured the refresh token is passed as a validated string to prevent native-side errors. Synchronized User Profiles → verified that ID, Name, and Profile Picture are correctly stored in the global state. Resolved "Undefined" UI colors → restored the primary theme constants for the Login button states. The real engineering insight today: Passing an object when a native module expects a string will crash your bridge every time. In React Native, keychain.setGenericPassword is a non-null host function; if your Redux selector or Thunk passes undefined during a state transition, the app doesn't just fail—it closes. Always validate your token types before they hit the storage layer. Stack: React Native, Redux Toolkit, Node.js Day 18/30. If anyone has pointers on handling token expiration gracefully in Redux middleware, let me know. #buildinpublic #nodejs #reactnative #javascript #softwaredevelopment
To view or add a comment, sign in
-
🚨 React Bug That Looks Correct… But Isn’t 👀 What’s wrong with this code? function App() { const [user, setUser] = React.useState({ name: "Suman", age: 22 }); const updateAge = () => { user.age = 23; setUser(user); }; return ( <> <button onClick={updateAge}>Update Age</button> <div>{user.age}</div> </> ); } At first glance, everything looks fine. But the UI doesn’t behave as expected. 👉 Why does this happen? 👉 How would you fix it? Small bug… but very common in real projects 👀 #ReactJS #FrontendInterview #JavaScript #ReactHooks #FrontendDeveloper #ProductBasedCompany
To view or add a comment, sign in
-
I built a complete enterprise app with NestJS in 48 hours. Here's everything I learned — explained so simply that even a non-developer can understand. NestJS has only 3 concepts: → Module (the container) → Controller (the receptionist) → Service (the worker) That's it. Everything else is this pattern repeated. I made a visual guide breaking down: • Why NestJS exists (and when NOT to use it) • The 3 building blocks with real code • How every request flows — 5 steps • Decorator cheat sheet (save this) • NestJS vs Express — honest comparison Swipe through the carousel ⬇️ --- What backend framework are you using in 2026? ♻️ Repost if this helped someone in your network 💾 Save for later reference #nestjs #backenddevelopment #typescript #webdevelopment #spftwareengineering #development #javascript
To view or add a comment, sign in
-
Most developers try to optimize React apps… without knowing what’s actually slow. That’s the problem. Before you optimize… You need to measure. That’s where the React Profiler comes in 🔍 ⚡ What is React Profiler? A tool (inside React DevTools) that shows: • Which components are re-rendering • How long each render takes • Why a component re-rendered 🧠 What it helps you discover • Unnecessary re-renders • Slow components • Expensive computations • Props/state changes causing re-renders 🔍 Real example You click a button and suddenly the whole page re-renders. Profiler shows: 👉 A parent component updated 👉 All child components re-rendered 👉 Even the ones that didn’t need to 🚀 How to fix (after profiling) • Wrap components with React.memo • Use useMemo for heavy calculations • Use useCallback for stable functions • Avoid passing new object/array references 💡 Biggest mistake Optimizing blindly. Adding memoization everywhere… without knowing if it even helps. Measure → Identify → Optimize That’s the correct flow. 💡 React performance is not about writing more code. It’s about writing smarter code based on data. Have you ever used React Profiler to fix a real issue? 👇 #React #Frontend #WebPerformance #JavaScript #SoftwareEngineering #WebDevelopment
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
It's really cool seeing the side-by-side comparison you've shared here. The difference in how cleanly React handles state versus manual DOM work is pretty striking when you see it laid out like this.