#React
13 items tagged “React”
useOptimistic auto-reverts on failure — a hand-rolled optimistic hook doesn't
TIL why React's useOptimistic hook doesn't need explicit rollback code when a server call fails, while a manual optimistic-update hook built on plain useState does.
Auth Context for Next.js (Cookie-Based Sessions)
A React context wrapping an API — login, logout, signup, and password reset — that keeps the client in sync with an httpOnly session cookie by revalidating on mount.
Using Framer Alongside a Development Workflow, Not Instead of One
TIL that building the Clonify Framer plugin taught me Framer is a genuinely different target than a normal web build — its plugin runtime and code-component model don't map 1:1 onto React conventions.
Turning Figma Designs Into Reusable React Components
TIL that building each screen straight from its Figma frame produced pixel-accurate but unreusable components — the fix was designing the component API from the design system's tokens, not from any one screen.
Designing a Dispatch Management Dashboard for Real Operations, Not a Generic Admin Panel
TIL that a dispatch dashboard built around 'show all the order fields' overwhelmed the person actually using it — the redesign that worked started from what a dispatcher needs to decide, not what data exists.
Injecting Custom UI Into a Website You Don't Own
TIL that a naive injected panel kept getting wiped out by the host page's own re-renders — the fix was watching for that, not fighting it, and mounting into a container the host page has no reason to touch.
useDebounce hook
A small generic hook for debouncing a fast-changing value — search inputs, resize handlers, anything you don't want firing on every keystroke.
A mental model for Server vs Client Components
The rule of thumb I actually use when deciding whether a component needs 'use client', and how a Server Component parent can still pass data down to it.
Using RTK Query for API Communication Instead of Hand-Rolled Fetching
TIL that most of my hand-written loading/error/cache state was solving a problem RTK Query already solves, and the switch removed more bugs than it added dependencies.
Building Reusable React Components Across Web and Mobile
TIL sharing components across a React web app and a React Native app only works if you split presentation from platform primitives from day one — retrofitting it later means rewriting most of your UI layer.
Moving from PHP to React: What Actually Changes
TIL the hard part of moving from PHP to React isn't JSX syntax — it's unlearning page-per-request thinking and stopping the urge to mutate the DOM yourself.
Pasal Business Management Platform
Internal business applications developed for inventory management, appointment systems, and daily operational workflows.
Clinical Management System — Karuna Hospital
A hospital management system built to digitize patient records, appointments, reports, and clinical workflows.