4 Challenges I Solved While Building a Shape Drawer Date: 8/4/2026 Today, I made a shape drawer project using React.js. 😊 This project is not for a resume or showcase. It is a project to build your logical thinking and to practice React syntax and logic. 🤔 In this project, I faced: 1. How to draw shapes based upon user clicks. 👉 For this problem, I learned what the getBoundingClientRect() function is. 2. How to achieve undo and redo functionality. 👉 For this problem, I used an undo stack and a redo stack, similar to a LIFO structure. 3. How to handle disabled buttons for both undo and redo. 👉 For this problem, I learned dynamic CSS styling. 4. How to get values for draw type, draw background color, and draw sizes. 👉 For this problem, I again used dynamic CSS styling based upon state. I did not only face these problems; I also created many states, performed CRUD operations, and handled app crashes. If you want to improve your logic and are not focused on UI, then I highly recommend you make this project. 🤔 I think this is a better way to improve your logic than only giving your entire time to LeetCode. Github repo - https://lnkd.in/gyextzCi #ReactJS #WebDevelopment #CodingJourney #JavaScript #FrontendDeveloper #ProgrammingLogic #100DaysOfCode #BuildInPublic #DeveloperCommunity #CodeNewbie #LogicBuilding #Frontend
More Relevant Posts
-
🚀 Repeating your layout in every React page? I faced this problem too. When I started using React Router, my code looked like this: 👉 Same Navbar in every page 👉 Same Sidebar everywhere 👉 Layout repeated again & again 😬 It worked… but it was messy and hard to maintain. 💡 The Problem: Without using Outlet 👇 ❌ Repeated layout code in every component ❌ Hard to update UI (change one → update all) ❌ Not scalable for large apps 💡 The Fix: Use Outlet 👉 import { Outlet } from "react-router-dom"; 💡 Solution Example: function Layout() { return ( <div> <Navbar /> <Outlet /> </div> ); } 👉 Now all pages render inside <Outlet /> 🎯 💡 Before vs After: ❌ Before: Every page = Navbar + Content + Footer 😓 ✅ After: Layout handles UI Outlet handles page content 🚀 💡 Why it matters: ✔ No more duplicate code ✔ Easy to maintain ✔ Clean project structure ✔ Perfect for dashboards & large apps 🔥 Pro tip: If you're repeating layouts — you're missing Outlet. 🔥 Lesson: Smart developers don’t repeat UI — they structure it. Are you still repeating layouts or using Outlet the right way? 👀 #React #ReactRouter #WebDevelopment #Frontend #CodingTips #JavaScript
To view or add a comment, sign in
-
-
🎨 Fresh Project: Building a Color Scheme Generator with Vanilla JS! I’m excited to share my latest frontend project: a Color Scheme Generator! 🚀 As I continue to sharpen my responsive design and JavaScript skills, I wanted to build something that solves a common problem for creators—finding the perfect palette. Whether you need a complementary contrast or a subtle monochrome vibe, this tool fetches it all in real-time using Vanilla JS and TheColorAPI. demo : https://lnkd.in/dk74nWT5 Git repo: https://lnkd.in/d9rhtt47 #WebDevelopment #Frontend #JavaScript #CodingJourney #CSS #ResponsiveDesign #LearnToCode
To view or add a comment, sign in
-
🚀 Frontend Practice Projects (JavaScript & DOM) I’ve been consistently practicing core JavaScript by building small projects focused on DOM manipulation, events, and logic building. Here are some of the projects I’ve worked on: 🎨 Color Interaction App – Implemented click and mouseenter events to dynamically change UI colors 🟦 100 Color Boxes Generator – Created 100 boxes using DOM and updated background color on click 🎮 Guess the Number Game – Built with 10 attempts, win/loss logic, reset feature, and win counter 🧩 Pokémon Cards UI – Rendered cards dynamically using arrays (name, ID, image) with click interactions ⚖️ BMI Calculator – Takes user input and calculates BMI with instant results ⏱️ Digital Clock – Implemented using setInterval with start/stop controls These projects helped me strengthen: ✔ DOM Manipulation ✔ Event Handling ✔ JavaScript Logic & State Management I’m currently working on improving these projects and learning APIs & modern JavaScript. 🔗 Check out my work on GitHub: https://lnkd.in/gZj6subx #JavaScript #FrontendDevelopment #WebDevelopment #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
Stop rewriting your React components. 🛑 You’re wasting time duplicating logic when you should be decorating. Think of the Decorator Pattern like your morning routine: 👕 Base: You (The Component) 🧣 Layer 1: Sweater (Adds withWarmth) 🧥 Layer 2: Raincoat (Adds withWaterproofing) You’re still the same person, but you’ve dynamically gained new powers. 🦸♂️ In React, we do this using Higher-Order Components (HOCs). Instead of baking "Logged In" logic into every page, you wrap it: 🔸 const ProtectedProfile = withAuth(UserProfile); 🔸 Why this wins: ✅ Clean Code: Your core component stays "pure." ✅ Scalability: Swap "clothes" (logic) in seconds. ✅ OCP: Open for extension, closed for modification. Are you still using HOCs, or have you moved entirely to Custom Hooks? . . . . #ReactJS #SoftwareArchitecture #Coding #WebDevelopment #CleanCode #LinkedIn #Frontend #DRY
To view or add a comment, sign in
-
🎨 My Frontend & Design Stack These are the technologies I use to build everything you see on screen. The visual layer, the interactions, and the structure of every app I create. 🌐 HTML5 — The skeleton of every webpage. Semantic structure that makes sites accessible and SEO-friendly. 🎨 CSS3 — The styling engine. Controls layout, spacing, colors and animations to make UIs look polished. ⚡ JavaScript — The brain of every interactive experience. Logic, events, and dynamic content. 🔷 TypeScript — JavaScript with strong typing. Catches bugs early and makes code more reliable. ⚛️ React.js — My core UI library. Reusable components and state management on every frontend I build. ▲ Next.js — The full-stack React framework. Fast, SEO-friendly, and production-ready out of the box. 💨 Tailwind CSS — Utility-first styling I use on every single project. Clean, fast and fully responsive. 🎬 Framer Motion — Smooth animations and micro-interactions that make UIs feel alive. Which of these do you use? Drop it below 👇 #MansurbCodes #Frontend #WebDevelopment #ReactJS #NextJS #JavaScript #TypeScript #TailwindCSS #FramerMotion #WebDesign #PakistaniDeveloper #Coding #LearnToCode
To view or add a comment, sign in
-
-
🌦️ Built a Weather App using JavaScript I created a Weather Application using HTML, CSS, and JavaScript as a small project to improve my frontend skills ✨ Features I implemented: • Search weather by city name • Display real-time temperature (°F) • Show humidity and wind speed • Display weather condition (Clear, Clouds, Rain, etc.) • Dynamic weather icons based on temperature • Clean and modern UI design 💡 How it works: I used a weather API to fetch real-time data like temperature, humidity, and wind speed. Based on the temperature, I added logic in JavaScript to dynamically change the weather icons (☀️ for hot, 🌤️ for normal, ☁️ for cool conditions). This project helped me understand: • API integration using JavaScript (fetch & async/await) • DOM manipulation • Conditional logic for dynamic UI updates • Building responsive and user-friendly interfaces #Applicationlink :https://lnkd.in/gt3DGRe5 Raviteja T Abdul Rahman 10000 Coders #JavaScript #WebDevelopment #Frontend #Projects #WeatherApp
To view or add a comment, sign in
-
What is Frontend Development? (And Why You Should Learn It) Frontend development is everything you see and interact with on a website or app — the buttons, animations, forms, and layouts. Here's a simple roadmap to get started: 1️⃣ Learn the Basics → HTML (structure), CSS (styling), JavaScript (logic) 2️⃣ Understand the Core Trio → These 3 languages power every website 3️⃣ Pick a Framework → React, Vue, Angular, or Next.js 4️⃣ Master Dev Tools → Git, VS Code, Browser DevTools, npm 5️⃣ Learn State Management → Redux, Zustand, Context API Frontend is the perfect starting point for beginners. You can see results instantly in the browser — no complex setup needed! #FrontendDevelopment #WebDev #HTML #CSS #JavaScript #Coding #BeginnerCoder #TechCareer #LearnToCode
To view or add a comment, sign in
-
-
A visual guide on React component useEffect lifecycle. How components mount and re-render in React and their relation with the useEffect hook is one of the most important concepts in React. To summarize, 1. When first-time components are inserted in the DOM, they're referred to as "mounted," then updated via rendering, and later "unmounted." 2. While mounting, a component initializes. 3. In the render stage, a virtual DOM gets created and compared, and in the commit stage, it gets painted to the browser. 4. Any effect gets executed during the commit. If the state changes, the component re-renders with vDOM creation during rendering, painting, and attaching to real DOM during the commit phase. Would you be interested in learning React/JavaScript with visuals and to-the-point explanations of how things work under the hood? I do a deep dive into foundational concepts & how things work under the hood. You can consider connecting with or following me, Ali Raza, to get along with the journey. Thanks. #react #javascript #frontend
To view or add a comment, sign in
-
Junior me: "Why is my React component randomly resetting?" Senior me: "Did you touch the DOM directly?" Junior me: "...maybe" Here's the lesson that took me longer than I'd like to admit: React owns the DOM. You don't. When you do this 👇 document.querySelector('.box').style.display = 'none'; React has no idea. On the next re-render, it overwrites you. Silently. Mercilessly. The right way? ✅ Use useEffect to run side effects after render ✅ Use useRef for safe, controlled DOM access ✅ Use state to drive UI changes — not DOM calls useEffect(() => { inputRef.current.focus(); }, []); This is React-aware. It survives re-renders. It cleans up after itself. The mental shift that changes everything: You're not telling the DOM what to do. You're telling React what the UI should look like. React does the rest. Took me a while to get this. Hope it saves you some debugging hours. 🙌 #React #useEffect #JavaScript #FrontendDevelopment #WebDev #ReactJS #Programming #DeveloperLife #TechTips #CodeNewbie
To view or add a comment, sign in
More from this author
Explore related topics
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