Most websites still have jumpy, default scrolling. But a small detail like smooth scrolling can instantly make a site feel more premium. So I experimented with Lenis in a React project to improve the scrolling experience. Here’s what I implemented: • Smooth scrolling across the entire app • Navigation buttons that scroll smoothly to sections • Programmatic scrolling using lenis.current.scrollTo() • Customizable easing and scroll behavior Lenis is surprisingly lightweight but gives you full control over how users move through your page. Small UI details like this can drastically improve how professional and polished a website feels. Still exploring more advanced configurations. If you're a frontend developer, have you tried Lenis or another smooth scrolling library? #React #FrontendDevelopment #JavaScript #WebDevelopment #UIUX
Improving Web Experience with Smooth Scrolling in React
More Relevant Posts
-
𝐔𝐧𝐝𝐞𝐫𝐬𝐭𝐚𝐧𝐝𝐢𝐧𝐠 𝐥𝐚𝐲𝐨𝐮𝐭.𝐭𝐬𝐱 𝐢𝐧 𝐍𝐞𝐱𝐭.𝐣𝐬 Every page in your app has a navbar. Every page has a footer. Maybe a sidebar too. In React you wrap every single page manually with these shared elements. It works. But every time you add a new page you have to remember to wrap it again. 𝘕𝘦𝘹𝘵.𝘫𝘴 𝘴𝘰𝘭𝘷𝘦𝘴 𝘵𝘩𝘪𝘴 𝘸𝘪𝘵𝘩 𝘰𝘯𝘦 𝘧𝘪𝘭𝘦 — 𝘭𝘢𝘺𝘰𝘶𝘵.𝘵𝘴𝘹 ───────────────────── 𝐇𝐨𝐰 𝐢𝐭 𝐰𝐨𝐫𝐤𝐬: Everything you put inside layout.tsx automatically wraps every page inside that folder. Your navbar goes in layout.tsx once. Your footer goes in layout.tsx once. Every page gets them automatically. 𝘕𝘰 𝘳𝘦𝘱𝘦𝘢𝘵𝘪𝘯𝘨 𝘺𝘰𝘶𝘳𝘴𝘦𝘭𝘧. 𝘕𝘰 𝘮𝘢𝘯𝘶𝘢𝘭 𝘸𝘳𝘢𝘱𝘱𝘪𝘯𝘨. ───────────────────── 𝐈𝐭 𝐠𝐞𝐭𝐬 𝐛𝐞𝐭𝐭𝐞𝐫. You can have different layouts for different sections of your app. app/ layout.tsx → navbar + footer for every page dashboard/ layout.tsx → sidebar for dashboard only page.tsx When a user visits /dashboard they get: → Global navbar from root layout → Dashboard sidebar from dashboard layout → Page content from page.tsx 𝘛𝘩𝘳𝘦𝘦 𝘭𝘢𝘺𝘦𝘳𝘴. 𝘡𝘦𝘳𝘰 𝘳𝘦𝘱𝘦𝘵𝘪𝘵𝘪𝘰𝘯. ───────────────────── 𝐇𝐞𝐫𝐞 𝐢𝐬 𝐬𝐨𝐦𝐞𝐭𝐡𝐢𝐧𝐠 𝐭𝐡𝐚𝐭 𝐦𝐚𝐤𝐞𝐬 𝐚 𝐛𝐢𝐠 𝐝𝐢𝐟𝐟𝐞𝐫𝐞𝐧𝐜𝐞: Layouts do not re-render when you navigate between pages. In React when you move between pages everything re-renders from scratch. In Next.js the layout stays exactly where it is. Only the page content changes. → Smoother navigation → Better performance → No unnecessary re-renders 𝘛𝘩𝘪𝘴 𝘪𝘴 𝘸𝘩𝘺 𝘕𝘦𝘹𝘵.𝘫𝘴 𝘢𝘱𝘱𝘴 𝘧𝘦𝘦𝘭 𝘴𝘰 𝘧𝘢𝘴𝘵 𝘵𝘰 𝘯𝘢𝘷𝘪𝘨𝘢𝘵𝘦. Simple way to remember it: page.tsx → what changes per route layout.tsx → what stays the same across routes 𝘕𝘦𝘹𝘵 𝘱𝘰𝘴𝘵 → Server vs Client Components — the biggest perspective change when moving from React to Next.js. Have you ever accidentally repeated a navbar across 10 pages? 👇 #nextjs #reactjs #webdevelopment #frontenddevelopment #javascript
To view or add a comment, sign in
-
🚀 Food Delivery App (React Project) I’ve built a Food Delivery Web App using React.js with modern UI and interactive features. ✨ Key Features: 🔍 Search functionality to quickly find food items 🧾 Filter items based on categories 🛒 Add to Cart functionality (managed with Redux) ➕➖ Update quantity in cart 💡 Dynamic UI with efficient state management ⚡ Fast and responsive design 🛠 Tech Stack: React.js (Functional Components + Hooks) Redux Toolkit (for cart state management) Context API (for UI state like search/filter) Tailwind CSS / CSS 📌 This project helped me understand: Component-based architecture Local vs Global state management Managing cart logic using Redux Handling search & filtering efficiently Building real-world UI logic 🔗 GitHub:https://lnkd.in/gmiR3NPc #React #Redux #JavaScript #WebDevelopment #Frontend #ReactJS #Projects
To view or add a comment, sign in
-
🚀 Stop Wasting Renders in React — Optimize Your App Like a Pro One of the most overlooked performance issues in React apps is wasted renders. A wasted render happens when a component re-renders without any actual change in the UI. Everything looks the same… but under the hood, React is doing unnecessary work. 💡 And in large applications? That cost adds up quickly. ⚠️ Why Should You Care? Slower UI interactions Increased CPU usage Poor user experience (especially on low-end devices) 🧠 Common Causes of Wasted Renders 👉 Parent components re-rendering unnecessarily 👉 Passing new object/function references every render 👉 Not memoizing expensive computations 👉 Over-reliance on global state updates 🛠️ How to Fix It ✅ Use React.memo Prevents re-render when props haven’t changed ✅ Use useCallback for functions Avoids recreating functions on every render ✅ Use useMemo for expensive calculations Caches results instead of recalculating ✅ Avoid inline objects & arrays They create new references every time ✅ Split components smartly Smaller components = more controlled re-renders 🔍 Real Insight Not every re-render is bad. 👉 React is designed to re-render efficiently 👉 Optimization is only needed when there’s a real performance issue The goal is simple: Render only when it actually matters. 🧩 Final Thought Performance optimization isn’t about writing more code — it’s about writing smarter code. If your app feels slow, don’t guess… Profile it, measure it, then optimize it. #React #Frontend #WebDevelopment #Performance #JavaScript #SoftwareEngineering #CleanCode
To view or add a comment, sign in
-
-
🚀 Next.js Frontend Best Practices for Modern Web Apps Building a great Next.js app isn't just about features; it's about architecture, performance, and developer experience. Here’s a quick-start guide to the best practices: - Use 'use client' carefully: Stick with Server Components by default for better performance, and use client components only when you need interactivity or browser-specific APIs. - Make components reusable: Build atomic UI pieces that can be easily shared across pages. - Optimize images: Always use the native <Image /> component to automatically handle resizing, scaling, and lazy-loading. - Use <Link /> for nav: Leverage Next's <Link> component for client-side navigation and automatic prefetching. - Simplify your UI: Prioritize a clean, intuitive, and efficient user experience. Avoid unnecessary visual noise. - Organize UI structure: Keep your codebase maintainable by grouping related files like components, hooks, and styles into separate folders. - Optimize bundle size: Keep your JavaScript bundle lean. Use code-splitting and dynamic imports, and be mindful of your library choices to ensure a smaller and faster app. Are you using these practices in your current projects? Let's discuss in the comments! 👇 #NextJS #WebDevelopment #FrontendEngineering #React #JavaScript #AIera
To view or add a comment, sign in
-
-
🚀 Built a React Product Listing App with "Show More" Functionality Excited to share a small React project I recently built! 🛍️ **React Shop** – A product listing application that fetches products from an API and displays them in a clean card layout. 🔧 **Tech Stack Used:** • React.js • Axios (for API calls) • CSS (Flexbox for responsive layout) ✨ **Key Features:** ✔ Fetch products from FakeStore API ✔ Display products in responsive cards ✔ "Show More" button to load additional products ✔ Error handling for API failures ✔ Clean UI with hover effects 📚 **Concepts Practiced:** • React Hooks (useState, useEffect) • API Integration using Axios • Conditional Rendering • Array methods (map, slice) • Component-based UI design Building projects like this helps strengthen real-world React development skills and understanding of API-driven applications. Looking forward to adding more features like **search, filters, and cart functionality** in future improvements. #ReactJS #WebDevelopment #FrontendDevelopment #JavaScript #APIIntegration #CodingJourney
To view or add a comment, sign in
-
🙌 Master the `usePermission` Hook in VueUse 🚀 As a Front-End Developer, handling browser permissions properly is super important for building modern web apps. 👉 With `usePermission` from VueUse, you can easily track permission status like: ✅ granted → Access allowed ❌ denied → Access blocked ⚠️ prompt → Waiting for user action 💡 Real Use Case: Want to check if the user allowed location or camera? Just use: ```js const permission = usePermission('geolocation') ``` 🔥 Why it’s powerful: * Reactive (auto UI update) * Clean & simple API * Perfect for modern Vue apps ⚡ Pro Tip: Always handle all 3 states (granted, denied, prompt) to improve UX. If you're working with Vue 3, this hook is a must-know! 👇 Have you used VueUse in your projects? Share your experience! #VueJS #VueUse #WebDevelopment #Frontend #JavaScript
To view or add a comment, sign in
-
-
Ever wondered what happens in a #React app when someone manually enters a random #URL? Let’s say your app has routes like: ➡️ /home ➡️ /menu But what if a user types something like: ➡️ /random-page What should happen? This is a common #React #Router interview question, and it tests how well you handle unknown #routes (a.k.a. 404 handling). 👉 In React Router, if #no #route matches the URL, nothing gets rendered by default — which is a bad user experience. ✅ The correct approach is to define a catch-all route #using "*". Example: <Route path="*" element={<NotFound />} /> Now whenever a user navigates to an unknown route: ✔️ You can show a 404 page ✔️ Or redirect them to /home ✔️ Or display a custom message 💡 Pro Tip: A good frontend developer doesn’t just build happy paths — they handle edge cases like this gracefully. Next time someone types a weird URL in your app, make sure they don’t land on a blank screen 👀 #React #FrontendDevelopment #InterviewPrep #JavaScript #WebDevelopment
To view or add a comment, sign in
-
Flutter on the web is not a gimmick anymore — but you need to know when NOT to use it. I've been building a Flutter web project alongside a standard Next.js app. The difference in rendering strategy is significant: Flutter Web rendering engines: CanvasKit → Pixel-perfect rendering, heavy initial load (~2MB WASM) HTML renderer → Lighter, but inconsistent across browsers Skwasm (new) → Multi-threaded, fastest option, requires COOP/COEP headers When Flutter Web makes sense: ✅ Internal dashboards and tools ✅ Apps already built in Flutter needing web parity ✅ Pixel-perfect design requirements When it doesn't: ❌ SEO-dependent public websites ❌ Content-heavy landing pages ❌ When initial load time is critical Flutter's web story is maturing fast. But choosing it blindly without understanding the renderer trade-offs will burn you in production. #Flutter #FlutterWeb #WebDevelopment #Dart #FullStackDeveloper
To view or add a comment, sign in
-
-
Multi-page navigation sounds basic — until you need it to feel seamless. 16-web-editorial-layouts is a TypeScript + React app exploring advanced multi-page navigation patterns with editorial-style layouts. Built to understand how routing decisions shape the entire user experience. Tech highlights: • TypeScript + React with clean, structured page routing architecture • Editorial layout patterns optimized for content-heavy UIs • Multi-platform CI/CD: Vercel, Netlify, Firebase, and Cloudflare • GitHub Actions pipeline with automated security scanning The key decision here was treating route transitions as a first-class design concern, not an afterthought. How content moves between pages directly shapes the mental model users build of your app. How do you approach page transitions in React — React Router, Next.js App Router, or something else entirely? #TypeScript #React #WebDevelopment #Frontend #UXEngineering
To view or add a comment, sign in
-
🚀 Phase 3 — Adding Interactivity to My Bible Web App After building the structure of my Bible Reference Web App, I moved to the next step — making the application interactive and user-friendly. In this phase, I focused on improving how users interact with the application 👇 ✨ Interactivity Features Implemented • Dynamic rendering of Bible books using JavaScript • Category-based filtering (Old Testament & New Testament) • Responsive UI with clickable book cards • Improved navigation for better user experience ⚙️ What I Learned • How to manipulate the DOM using JavaScript • Handling user interactions like clicks and navigation • Writing cleaner and reusable code • Improving UI/UX for better usability 💡 Key Insight Interactivity is what transforms a static website into a real web application. This phase helped me understand how important user experience is in frontend development. Grateful for the guidance from 10000 Coders and my trainer Ajay Miryala. Explore the project here 👇 🌐 Live Website https://lnkd.in/gcgBidbH 💻 GitHub Repository https://lnkd.in/ghGeGgcg #WebDevelopment #JavaScript #FrontendDevelopment #UIUX #LearningInPublic #DeveloperJourney #10000Coders #BuildInPublic
To view or add a comment, sign in
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