Posts by Anas Sheikh

@Anas Sheikh

PIxel Anas

Full-stack developer building premium Next.js templates & web apps. Specializing...
Pakistan pixelanas.com Joined August 2026
1.8k Points • 94 Badges • 9 Connections • 8 Followers • 12 Following

Comments by Anas Sheikh

3 days • Articles • 4 min read
You need a theme provider, so you create a file, add 'use client' at the top, and wrap your app in it. Then a nagging thought arrives: "I just wrapped my entire layout in a client component. Did I turn the whole app into client-side React?" Most de...
6 days • Articles • 4 min read
Your endpoint sends 50 emails, marks 50 orders as shipped, and returns { success: true }. In your tests, it works. In production, the response comes back in 8 milliseconds, half the orders are still pending, and one failed email crashed the whole No...
Oct 13 • Articles • 4 min read
This is one of the more consequential Mongoose gotchas because of exactly what tends to live inside a pre'save' hook, password hashing, slug generation, validation logic, and exactly which methods silently bypass it without ever telling you. The Set...
Oct 12 • Articles • 4 min read
Redirecting a user back to the page they were trying to reach after they log in is good, expected UX. Nobody wants to log in and land back on the homepage when they were actually trying to read a specific article or check out a specific product. The ...
Oct 11 • Articles • 3 min read
Middleware feels like the cleanest way to gate an entire section of a Next.js app behind auth, one file, one config, covering everything under a path. That confidence is exactly the problem, because the matcher config that's supposed to define "every...
Oct 9 • Articles • 4 min read
Somewhere along the way, a lot of Next.js developers picked up the idea that "Server Actions are secure by default" and quietly generalized that into "mutations in this app are secure by default." Those are not the same statement, and the gap between...
Oct 1 • Articles • 4 min read
Deciding something needs to change is the easier decision. The harder one, and the one that actually determines cost and timeline, is whether that change is a handful of targeted fixes or a genuine rebuild from the ground up. Getting this wrong in ei...
Sep 23 • Articles • 4 min read
This one isn't really a bug, it's a genuinely common point of confusion about a feature working exactly as designed, and understanding why it behaves this way changes how you'd actually build around it, rather than fighting it. The Pattern: A Photo ...
Sep 17 • Articles • 4 min read
Jumping into custom web app development before a business actually needs it is a common, expensive mistake, and so is waiting too long after the signs are already clear, stuck manually working around limitations that a real, custom solution would hav...
Sep 14 • Articles • 3 min read
This one catches people specifically because the code looks like careful error handling, and it's actually the thing breaking the exact feature it's wrapped around. The Setup That Looks Like Responsible Error Handling // actions/auth.ts 'use server...
Sep 11 • Articles • 3 min read
I've recommended .lean in earlier posts, it's genuinely the right call for read-heavy queries, faster, lighter, no Mongoose document overhead. There's a real gap it opens up that's worth calling out specifically, because it silently undoes a common, ...
Sep 11 • Articles • 3 min read
next/image optimizing external images is genuinely convenient, resizing, format conversion, all handled automatically through Next.js's built-in image optimization endpoint. That endpoint fetches the remote image server-side before serving the optimi...
Posted in Dev Stories group
Sep 9 • Articles • 9 min read
Five Years of Not Giving Up — My Journey as a Developer Five years ago, I had no idea where programming would take me. It started with my cousin. He had started learning programming, and one day he recommended that I give it a try too. I didn't i...
post-cover-26580
Sep 4 • Articles • 3 min read
Here's something that trips up almost everyone moving from a fetch-based API to a direct MongoDB connection in Next.js, and it's costing real database load on projects that don't even realize it's happening. Next.js automatically deduplicates fetch ...
Aug 26 • Articles • 5 min read
An API route with no rate limiting works fine right up until someone hits it a thousand times a second, either by accident a buggy client retry loop or on purpose. I learned this the annoying way, watching a client's database bill spike because a pub...
chevron_left