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
2k Points • 126 Badges • 9 Connections • 8 Followers • 12 Following

Posts by Anas Sheikh

Anas Sheikh • • in Articles • 6 min read
You build an AI feature. The model takes eight seconds to write the full answer. You show a spinner for eight seconds, then the whole answer appears at once. Technically it works. Your users think it is broken. Open any chat product you like and wa...
Anas Sheikh • • in Articles • 4 min read
The endpoint was fast in development. In production it takes two seconds, and it gets slower every week. So you do what most of us do. You add .lean. You add an index on a field that sounds important. You wonder if the server is too small. Maybe the...
Anas Sheikh • • in Articles • 5 min read
AI-generated code has a particular way of failing. It does not look broken. It is neatly formatted, well named, commented, and the happy path works on the first run. That is exactly the problem. When code looks this confident, we review it less care...
Anas Sheikh • • in Articles • 4 min read
You ship an AI feature on Friday. It works. People like it. On Monday you open the billing page and the number is ten times what you expected. Nobody attacked you. No server was hacked. One user pasted a book into the input box, another found a butt...
Anas Sheikh • • in Articles • 5 min read
You add an AI feature to your support tool. It reads each incoming ticket, writes a summary, and can issue a refund when the customer is clearly owed one. The demo is great. Everyone is impressed. Then a customer submits a ticket that says: > Ignor...
Anas Sheikh • • in Articles • 4 min read
Here is a type you have probably written: type UserState = { isLoading: boolean; error?: string; data?: User; }; It looks reasonable. Then one day your UI shows a spinner on top of an error message, and a user stares at a screen that says bo...
Anas Sheikh • • in Articles • 4 min read
Coverage says 94%. Every test is green. You deploy on Friday afternoon, and by Monday a customer has found a bug in the exact function you "tested". When you open the test, the reason is obvious in hindsight. The test never ran your code. It ran a f...
Anas Sheikh • • in Articles • 4 min read
A user fills in your form and clicks "Create post". The post is saved in the database. And the page shows "Could not create post". They try again. Now there are two posts. Nothing is wrong with your database. Your error handling caught something it...
Anas Sheikh • • in Articles • 4 min read
Here is a pattern I see in almost every React codebase I read: const fullName, setFullName = useState''; useEffect => { setFullNamefirstName + ' ' + lastName; }, firstName, lastName; It works. It also renders twice every time a name changes, sh...
Anas Sheikh • • in Articles • 4 min read
You notice it during a code review: .env is in the repository. Your stomach drops. You run git rm .env, commit with the message "remove env file", push, and feel the relief of a problem solved. It is not solved. The file is gone from your latest com...
Anas Sheikh • • in Articles • 4 min read
You upgrade from Next.js 14 to 15. The app compiles, the tests pass, nothing visibly breaks. A week later your database bill is higher, your pages feel slower, and your Time to First Byte graph has a step in it that lines up exactly with the deploy. ...
Anas Sheikh • • in Articles • 4 min read
A user scrolls through your feed. Page 1 ends with "Post 20". They tap "Next", and page 2 starts with... "Post 20" again. Another user pages through an admin table and never sees order #4817. It exists. It is in the database. It just never showed up...
Anas Sheikh • • in Articles • 4 min read
A customer clicks "Pay now". Nothing happens for three seconds, so they click again. Or their phone loses signal for a moment and the app quietly retries the request. Or your load balancer times out and sends the request again. Your server received ...
Anas Sheikh • • in 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...
Anas Sheikh • • in Articles • 4 min read
Your stomach drops. You typed git reset --hard, or deleted the wrong branch, or a rebase ended with half your commits missing. The log looks empty. Three days of work, gone. Take a breath. If you ever committed that work, it is almost certainly stil...
Anas Sheikh • • in Articles • 3 min read
You build a dashboard. Sidebar on the left, content on the right, a table or a code block inside. It looks perfect with your sample data. Then a user pastes a long URL into a field, and the whole page grows a horizontal scrollbar. The sidebar gets s...
Anas Sheikh • • in Articles • 4 min read
You format a date in a component. It looks right on your laptop. Then a user in another country opens the page and either sees a console full of hydration errors, or worse, sees nothing wrong at all and reads the wrong time. I live in a timezone tha...
Anas Sheikh • • in 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...
Anas Sheikh • • in Articles • 4 min read
TypeScript's most dangerous keyword is two letters long. as does not convert anything. It does not check anything. It tells the compiler "trust me", and the compiler does. If you are wrong, the error moves from your editor to your users. Here are f...
Anas Sheikh • • in Articles • 4 min read
You add a small search box to your navbar. It reads the query string, so you reach for useSearchParams. Everything works in next dev. You push, the deploy fails, and the build log says: useSearchParams should be wrapped in a suspense boundary at pag...
chevron_left