Day 19 #100DaysOfCode 💻#Extra Today I learned how to fetch data in Next.js using async Server Components. In Next.js App Router, we can directly use async/await inside components. No need for useEffect or extra state handling. This makes data fetching cleaner and faster. Example: const UsersPage = async () => { const res = await fetch('https://lnkd.in/gc6VE9Hi'); const users = await res.json(); return ( <div> {users.map(user => ( <p key={user.id}>{user.name}</p> ))} </div> ); }; Simple, clean, and powerful way to handle data in modern React 🚀 #NextJS #ReactJS #WebDevelopment #FrontendDeveloper #LearningInPublic #Akbiplob
Fetch Data in Next.js with Async Server Components
More Relevant Posts
-
🚨 Why Your Node.js App Slows Down Over Time (Hidden Memory Leaks) If your Node.js app starts fast but gets slower over time… you might have a memory leak. 👉 This is a senior-level issue most developers ignore. 🔍 Common causes: ❌ Unremoved event listeners ❌ Global variables growing over time ❌ Caching without limits ❌ Open database connections ❌ setInterval / setTimeout not cleared 💡 Example mistake: Adding event listeners inside a request handler app.get("/", (req, res) => { process.on("event", () => {}) // ❌ memory leak }) Every request adds a new listener → memory keeps increasing 💡 Fix: ✔ Remove listeners when not needed ✔ Use weak references where possible ✔ Monitor memory usage (heap snapshots) ✔ Use tools like: Chrome DevTools clinic.js ⚡ Senior Rule: “If memory keeps growing, your app will eventually crash — it’s just a matter of time.” Don’t just fix bugs… prevent system failure. #nodejs #backend #memoryleak #performance #javascript #webdev #fullstackdeveloper #debugging
To view or add a comment, sign in
-
𝗧𝗶𝗽𝘀 𝗙𝗼𝗿 𝗕𝗎𝗶𝗹𝗱𝗶𝗻𝗴 𝗔 𝗙𝗎𝗹𝗹-𝗦𝘁𝗮𝗰𝗸 𝗔𝗽𝗽 𝗜𝗻 𝗔 𝗪𝗲𝗲𝗸𝗲𝗻𝗱 You want to build a full-stack app in a weekend. This is possible with the right tools and plan. - Choose the right technologies: React.js for the frontend, Node.js with Express for the backend, and MongoDB for the database. - Set up a RESTful API with Express and MongoDB. - Use create-react-app to bootstrap the frontend. - Connect your React app with the backend using Axios. - Add user authentication using libraries like Passport.js. To succeed, start with simple goals and allocate your time wisely. Use online resources and community Q&As when you need help. - Focus on building a modular and scalable app. - Leverage component reusability in React. - Test and debug your app thoroughly. Building a full-stack app in a weekend is about the experience and skills you gain. Stay focused, use the right tools, and you will have a new app and a deeper understanding of development. Source: https://lnkd.in/gAH_UdUJ
To view or add a comment, sign in
-
Started my backend development journey today with Node.js and Express.js 💻 Today’s learnings: What is Node.js and how it works (event-driven, non-blocking I/O) Setting up a basic server using Express.js Understanding routes and handling requests Built my first simple server 👇 JavaScript const express = require('express'); const app = express(); // Basic route app.get('/', (req, res) => { res.send('Hello, Backend World!'); }); // Server listening app.listen(3000, () => { console.log('Server is running on port 3000'); }); Small steps today, big goals ahead 🚀 Consistency is the key 🔥 #BackendDevelopment #NodeJS #ExpressJS #WebDevelopment #CodingJourney #Day1 #LearningInPublic
To view or add a comment, sign in
-
A question I get a lot from developers: how do I get my Node.js app off my local machine and onto the internet? I just published an article that answers that in full. How to Deploy a Node.js App to Render covers: - Preparing your app for production - Why process.env.PORT matters and what happens if you hardcode it - Adding environment variables on Render - The port blocking issue that breaks most email sending in production - Why Nodemailer works on Render using port 587 - Automatic deployments from GitHub - Render vs Railway comparison This is based on how I deployed my own Taskflow(https://lnkd.in/eZf3E5Bz) application, including getting email sending working in production. Read it here: https://lnkd.in/emtsRykc #NodeJS #Render #Railway #Deployment #BackendDevelopment #FullStack #JavaScript #TechnicalWriting #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
-
Most Next.js developers are still using Pages Router in 2026. Here's why that's a mistake. 🧵 When Next.js released the App Router I ignored it for months. "Too complex. Pages Router works fine." Then I built a production app with App Router... And I never went back. The real difference? Pages Router: ❌ No Server Components ❌ Slower data fetching ❌ Being phased out slowly App Router: ✅ Server Components by default ✅ Fetch data directly in components ✅ Built-in layouts ✅ The future of Next.js If you're starting a new project in 2026 there's only one right answer. App Router. Every time. Are you still on Pages Router? Tell me why 👇 #NextJS #ReactJS #WebDevelopment #FullStackDeveloper #TypeScript #JavaScript #Frontend #100DaysOfCode #BuildInPublic #LahoreTech
To view or add a comment, sign in
-
-
Most Next.js developers are still using Pages Router in 2026. Here's why that's a mistake. 🧵 When Next.js released the App Router I ignored it for months. "Too complex. Pages Router works fine." Then I built a production app with App Router... And I never went back. The real difference? Pages Router: ❌ No Server Components ❌ Slower data fetching ❌ Being phased out slowly App Router: ✅ Server Components by default ✅ Fetch data directly in components ✅ Built-in layouts ✅ The future of Next.js If you're starting a new project in 2026 there's only one right answer. App Router. Every time. Are you still on Pages Router? Tell me why 👇 #NextJS #ReactJS #WebDevelopment #FullStackDeveloper #TypeScript #JavaScript #Frontend #100DaysOfCode #BuildInPublic #LahoreTech
To view or add a comment, sign in
-
-
⚡ A small Promise.all detail that can break your app Promise.all looks simple. Run multiple async tasks → get all results. But here’s the catch 👇 ❌ If even one promise fails, everything fails So even if 2 APIs succeed and 1 fails… you get nothing 😬 This hit me in a real project 👇 One non-critical API failed, and the entire page broke 💥 What I do now: ✅ Use Promise.all only when all results are required ✅ Use Promise.allSettled when partial data is acceptable Because sometimes… 👉 Partial data > No data Small detail. Real impact. #JavaScript #FrontendDevelopment #WebDevelopment #AsyncJS #SoftwareEngineering
To view or add a comment, sign in
-
🚀 Built an in-app API inspector for React Native While working on multiple RN apps, I kept switching between tools like Flipper just to debug network calls. It broke the flow more often than it helped. So I built "rn-api-inspector" a lightweight devtool that runs directly inside your app. 👉 No setup 👉 No external tools 👉 Zero impact in production Key features: • Works with both fetch & axios • Inspect requests, headers, body & response • Retry API calls instantly • Search, filter & group requests • Runs only in DEV The goal was simple: Make debugging APIs fast, frictionless, and actually enjoyable. 📦 npm: https://lnkd.in/dQ9yAXMZ Would love to hear your feedback or suggestions! #ReactNative #MobileDevelopment #JavaScript #OpenSource #DevTools
To view or add a comment, sign in
-
-
I built a recipe app — Vyanjan 🍽️ 🔗 https://lnkd.in/gQ_8b8-U What started as a simple idea: “Fetch recipes and display them” …quickly turned into something more complex. State started getting messy. Components became tightly coupled. Even a small feature like “Add to favourites” needed proper logic and structure. That’s when I realized: Frontend isn’t just about UI. It’s about managing data flow and building systems that scale. So I rebuilt parts of it using: • Context API for global state • Better component structure • Cleaner API handling Tech Stack: React • Context API • React Router • Axios • TailwindCss • Vite Still improving it step by step. #WebDevelopment #FrontendDeveloper #ReactJS #FullStackDevelopment #BuildInPublic #CodingProjects
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