---
title: "Kamran Khan (@kamrankhandev) | Hashnode"
description: "Full-Stack Web Developer (React.js + Laravel) | Dashboards, SaaS Apps & Management Systems for Global Clients"
url: "https://hashnode.com/@kamrankhandev"
---

@kamrankhandev

# Kamran Khan

@kamrankhandev · Lahore, Pakistan · Joined October 2026

Full-Stack Web Developer (React.js + Laravel) | Dashboards, SaaS Apps & Management Systems for Global Clients

[Website](https://kamran1272.github.io/portfolio/)

### [Logout should never get stuck on a failed request: clear the session locally no matter what](https://kamrankhandev.hashnode.dev/logout-should-never-get-stuck-on-a-failed-request-clear-the-session-locally-no-matter-what?utm_source=hashnode&utm_medium=feed)

I have been logged into apps where logout spun, failed, and left me staring at a dashboard I had just tried to leave. Usually on bad hotel wifi. The server never got the request, the frontend treated

2 min read · [kamrankhandev.hashnode.dev](https://kamrankhandev.hashnode.dev/logout-should-never-get-stuck-on-a-failed-request-clear-the-session-locally-no-matter-what?utm_source=hashnode&utm_medium=feed)

[Oct 30](https://hashnode.com/posts/logout-should-never-get-stuck-on-a-failed-request-clear-the-session-locally-no-matter-what/6ae428e35329174a879da5e5)

### [After you save or delete a user, stay on the same page: the refetch argument I always pass](https://kamrankhandev.hashnode.dev/after-you-save-or-delete-a-user-stay-on-the-same-page-the-refetch-argument-i-always-pass?utm_source=hashnode&utm_medium=feed)

Here is a small annoyance that drives admins quietly mad: you are on page 4 of the users table, you edit someone, you save, and the table dumps you back on page 1. Nothing broke. The data is fine. But

3 min read · [kamrankhandev.hashnode.dev](https://kamrankhandev.hashnode.dev/after-you-save-or-delete-a-user-stay-on-the-same-page-the-refetch-argument-i-always-pass?utm_source=hashnode&utm_medium=feed)

[Oct 30](https://hashnode.com/posts/after-you-save-or-delete-a-user-stay-on-the-same-page-the-refetch-argument-i-always-pass/6ae4283791d07993fa7cbac6)

### [Read my api.php top to bottom and you already know the permission model: three route tiers, no surprises](https://kamrankhandev.hashnode.dev/read-my-api-php-top-to-bottom-and-you-already-know-the-permission-model-three-route-tiers-no-surprises?utm_source=hashnode&utm_medium=feed)

Open routes/api.php in a new project and you can usually tell within a minute whether the author thought about permissions or just bolted them on later. The giveaway is scattering: an auth middleware

3 min read · [kamrankhandev.hashnode.dev](https://kamrankhandev.hashnode.dev/read-my-api-php-top-to-bottom-and-you-already-know-the-permission-model-three-route-tiers-no-surprises?utm_source=hashnode&utm_medium=feed)

[Oct 30](https://hashnode.com/posts/read-my-api-php-top-to-bottom-and-you-already-know-the-permission-model-three-route-tiers-no-surprises/6ae427847a929ceb52e5b252)

### [Your pagination buttons should read the API's meta, not your own props](https://kamrankhandev.hashnode.dev/your-pagination-buttons-should-read-the-api-s-meta-not-your-own-props?utm_source=hashnode&utm_medium=feed)

I have seen pagination components that take totalPages as a prop and compute it themselves from a count. Then the backend changes the page size from 15 to 25, and the frontend cheerfully shows the wro

2 min read · [kamrankhandev.hashnode.dev](https://kamrankhandev.hashnode.dev/your-pagination-buttons-should-read-the-api-s-meta-not-your-own-props?utm_source=hashnode&utm_medium=feed)

[Oct 23](https://hashnode.com/posts/your-pagination-buttons-should-read-the-api-s-meta-not-your-own-props/6adaee020a82624ab9871741)

### [The Vite config I never ship: how my live demo stays fast without bloating the product](https://kamrankhandev.hashnode.dev/the-vite-config-i-never-ship-how-my-live-demo-stays-fast-without-bloating-the-product?utm_source=hashnode&utm_medium=feed)

My kit's repo has two Vite configs. One is the product. The other is temporary, and the file header says so in plain words: temporary build config for the demo deploy only, not for the shipped product

2 min read · [kamrankhandev.hashnode.dev](https://kamrankhandev.hashnode.dev/the-vite-config-i-never-ship-how-my-live-demo-stays-fast-without-bloating-the-product?utm_source=hashnode&utm_medium=feed)

[Oct 23](https://hashnode.com/posts/the-vite-config-i-never-ship-how-my-live-demo-stays-fast-without-bloating-the-product/6adaedb6be1358d70d5a9999)
