Just built a Random GIF Generator using React! 🎉 It's a small project, but it packs some solid React concepts: 🔹 Custom Hook (useGif) — abstracted all the API logic away from the UI, keeping components clean and reusable 🔹 Conditional Rendering — swaps in a spinner while the GIF loads, so the UX feels smooth 🔹 Axios + Giphy API — fetching random GIFs, with optional tag-based filtering 🔹 Two components, one hook — Random fetches any GIF, Tag lets you search by keyword The thing I'm most proud of? The useGif custom hook. One hook, two completely different components, zero duplicated fetch logic. That's the magic of React hooks. ✨ Every small project teaches something new. This one reinforced how powerful custom hooks are for separating concerns. Inspired by @Love Babbar's teachings! What's a small project that taught you a big lesson? Drop it in the comments 👇 #React #JavaScript #WebDevelopment #FrontendDevelopment #ReactHooks #BuildInPublic
More Relevant Posts
-
Whether you're building a complex dashboard or a simple search bar, UI jank is the ultimate vibe-killer. If you've ever felt like your app was "stuttering" because a heavy UI update was fighting with user input, useDeferredValue is about to become your new best friend. Here’s the breakdown of why this hook is a game-changer for React performance. 🚀 💡 The Problem: Blocking the Main Thread Normally, React updates are urgent. If a user types into an input and that input triggers a massive re-render (like filtering a list of 10,000 items), the typing feels "laggy" because React is too busy rendering the list to handle the keystrokes. ✨ The Solution: useDeferredValue This hook allows you to mark a piece of state as non-urgent. It tells React: "Hey, keep the input feeling snappy. Update the heavy UI when you have a spare moment." 🛠️ How it works: 1. React updates the "urgent" state (the input text) immediately. 2. It then attempts to render the "deferred" value in the background. 3. If the user types again before the background render finishes, React interrupts the old render and starts over with the new value. ⚡ When to use it? Expensive Re-renders: When a part of your UI is slow to render and there's no way to further optimize the component itself. Search/Filtering: Keeping the search input responsive while the results list "catches up." Third-party integrations: When you're passing data to a library that you don't have performance control over. Pro-Tip: For the best UX, pair it with React.memo on the component receiving the deferred value. This ensures the component only re-renders when the deferred value actually changes! Have you made the switch from traditional debouncing to useDeferredValue yet? Let’s talk about it in the comments! 👇 #ReactJS #WebDevelopment #Frontend #JavaScript #CodingTips #React18 #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 𝗙𝗶𝘅𝗶𝗻𝗴 𝗥𝗲𝗮𝗰𝘁 𝗧𝗮𝗯𝗹𝗲 𝗟𝗮𝗴 𝗪𝗵𝗲𝗻 𝗨𝘀𝗲𝗿𝘀 𝗦𝗲𝗹𝗲𝗰𝘁 𝗠𝘂𝗹𝘁𝗶𝗽𝗹𝗲 𝗥𝗼𝘄𝘀 Recently worked on a performance issue where the React Table UI started lagging whenever users selected multiple rows. As the number of selected rows increased, the table became slow and less responsive. 🔍 𝗥𝗼𝗼𝘁 𝗖𝗮𝘂𝘀𝗲: Unnecessary re-renders of rows and table components Expensive state updates on every selection change Repeated calculations during row selection 💡 𝗦𝗼𝗹𝘂𝘁𝗶𝗼𝗻 𝗜𝗺𝗽𝗹𝗲𝗺𝗲𝗻𝘁𝗲𝗱: Optimized state management for row selection Used useMemo and useCallback to prevent redundant renders Applied component memoization for better rendering control Ensured only affected rows updated instead of the full table refresh ✅ 𝗥𝗲𝘀𝘂𝗹𝘁: Smooth multi-row selection Faster UI response time Better scalability for large datasets Improved overall user experience 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗼𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻 𝗶𝘀 𝗻𝗼𝘁 𝗷𝘂𝘀𝘁 𝗮𝗯𝗼𝘂𝘁 𝘀𝗽𝗲𝗲𝗱 — 𝗶𝘁’𝘀 𝗮𝗯𝗼𝘂𝘁 𝗰𝗿𝗲𝗮𝘁𝗶𝗻𝗴 𝗮 𝘀𝗲𝗮𝗺𝗹𝗲𝘀𝘀 𝗲𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲 𝗳𝗼𝗿 𝘂𝘀𝗲𝗿𝘀. ⚡ #ReactJS #FrontendDevelopment #PerformanceOptimization #JavaScript #WebDevelopment #ReactTable #UIUX #CodingJourney
To view or add a comment, sign in
-
Experience it live: https://lnkd.in/gR_m5p66 I recently built a Water Ripple Effect interaction with Three.js to make the UI feel more alive and tactile. Key focus areas: Responsiveness: Real-time ripple feedback on user interaction. Optimization: Ensuring high performance without sacrificing visual quality. Modularity: A clean structure designed for easy integration. What do you think about the visual weight and realism of the ripples? #ThreeJS #WebGL #FrontendDevelopment #CreativeCoding #JavaScript #UIEngineering #InteractiveDesign
To view or add a comment, sign in
-
I used useEffect… everywhere 😅 Until it caused a weird UI flicker I couldn’t explain. That’s when I learned the real difference 👇 👉 useEffect Runs AFTER the browser paints the screen Best for: API calls, logging, side effects 👉 useLayoutEffect Runs BEFORE the screen updates Best for: measuring DOM, fixing layout issues 💡 Real example: I was calculating an element’s width on load With useEffect → UI rendered first, then adjusted (flicker ⚡) With useLayoutEffect → no flicker, smooth UI ✅ ⚠️ But don’t overuse it — it can block rendering and slow your app That one small change improved my UI a lot. Have you faced this issue before? 👇 #reactjs #frontend #webdevelopment #javascript
To view or add a comment, sign in
-
-
#FrontendFridays - Loading to Success Button This week, I built a simple yet practical UI interaction that transitions a button from a loading state to a success state. This pattern is commonly used in real-world scenarios like form submissions and API calls to provide clear user feedback. Key highlights: • Loading spinner with disabled state • Smooth transition to success feedback • Auto reset after completion • Lightweight and reusable component Live Demo: https://lnkd.in/gZ2jgKYy Continuing to explore small UI interactions that improve user experience with minimal code. #FrontendFridays #FrontendDevelopment #WebDevelopment #UIUX #JavaScript #CSS #HTML
To view or add a comment, sign in
-
-
Is everyone already using shadcn/ui and I’m just late to the Terminal? 🤯 I just came across this while looking into useful UI tools, and it’s actually brilliant. The concept is so simple but effective: copy-pasteable components that are fully accessible and styled with Tailwind. It’s like having a high-end design system ready to go without any of the usual library bloat. If you haven't seen it yet, do yourself a favor and take a look. It's really great!! #DeveloperTools #shadcn #ReactJS #TailwindCSS #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Excited to share my first open-source npm package — react-onboard-kit! It's a zero-dependency React component library for building beautiful product tours, spotlight walkthroughs, and onboarding experiences. ✨ What it does: 🎯 Spotlight overlay — highlights any element on the page 💬 Positioned tooltips — top, bottom, left, right 🧩 Step-by-step walkthroughs — with back, next & done navigation ⌨️ Keyboard support — arrow keys + Esc 🎨 Fully customizable — theme every color, radius & size 📦 Zero dependencies — only React required Setting it up is as simple as: npm install react-onboard-kit Then wrap your app in <TourProvider>, mark elements with <TourStep>, and call start() — that's it! 👇 Try the live demo here: https://lnkd.in/gkvstFUa Would love your feedback! Drop a ⭐ on GitHub or let me know what features you'd like to see next. #OpenSource #React #Frontend #JavaScript #TypeScript #npm #WebDevelopment #UI #UX
To view or add a comment, sign in
-
Understanding React at a deeper level isn’t about knowing more hooks — it’s about knowing when to use them correctly. useEffect and useLayoutEffect may look similar, but their timing can directly impact performance and user experience. 🔹 useEffect Runs after the component renders and the browser paints the UI. It’s non-blocking and ideal for side effects like API calls, subscriptions, event listeners, and async operations. 🔹 useLayoutEffect Runs synchronously after DOM updates but before the browser paints. It blocks rendering, making it useful for DOM measurements, layout adjustments, and preventing visual flickers. Mastering these small details is what separates clean code from truly optimized applications. #React #ReactNative #FrontendDevelopment #JavaScript #SoftwareEngineering #WebDevelopment
To view or add a comment, sign in
-
-
🔐 Built a Clean & Interactive OTP Input Component using React Recently, I worked on building a fully functional OTP (One-Time Password) input UI with a focus on both user experience and real-world usability. ✨ Key Features: • Auto-focus on next input while typing • Backspace navigation (moves to previous input) • Input validation (only digits allowed) • Clean and responsive UI with modern styling • Ref handling using useRef for DOM control 💡 This is a commonly asked frontend interview question in companies like Microsoft, Google, Atlassian, etc., and a great example of how DSA + DOM manipulation + UX thinking come together in real-world applications. 🧠 What I learned: Managing focus dynamically, handling edge cases (like backspace & paste), and building a smooth user experience using React hooks. 🚀 Live demo & code: 👉 GitHub: https://lnkd.in/ga92Jib9 Would love to hear your feedback and suggestions! #ReactJS #FrontendDevelopment #JavaScript #WebDevelopment #UIUX #Coding #InterviewPreparation #100DaysOfCode
To view or add a comment, sign in
-
I challenged myself to recreate the DJI website — and here’s my DJI UI Clone (built for learning purposes)! 💻 🔗 Live Demo: https://lnkd.in/gk7uHktY Instead of just copying the design, I focused on understanding: 💡 How complex layouts are structured 💡 How product sections are organized visually 💡 How responsiveness actually works across devices 🛠️ Built with: HTML, CSS, Bootstrap ⚡ What made this challenging: Getting consistency in spacing, alignment, and grid behaviour across screen sizes — small details made a big difference. 📈 What this improved: • My UI structuring skills • Confidence in building responsive layouts • Ability to break down real websites into components Next step → Turning this into a dynamic MERN app with backend integration 🔥 Open to feedback and suggestions! #FrontendDevelopment #WebDeveloper #MERNStack #ReactJS #JavaScript #Bootstrap #ResponsiveDesign #UIDesign #FullStackJourney #100DaysOfCode
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