---
title: "Blogs"
url: "https://sanyam.sh/blogs"
---

# Blogs

- [safe triangles, and the submenu you cannot reach](https://sanyam.sh/blogs/the-submenu-closes-before-you-get-there), 2026-08-31, 4 min read
  Aim at the bottom of a submenu and your cursor cuts across three rows on the way. Every one is a real hover, and the menu believes all of them. The fix is a triangle, and it has a name.
- [CSR vs SSR vs SSG vs ISR vs PPR](https://sanyam.sh/blogs/csr-vs-ssr-vs-ssg-vs-isr-vs-ppr), 2026-08-29, 2 min read
  What each one does, when it runs, and one real example each.
- [turning a signature into two pen strokes](https://sanyam.sh/blogs/turning-a-signature-into-two-pen-strokes), 2026-08-25, 5 min read
  A font gives you closed outlines, and stroking one animates from six places at once. What it takes to get a signature into centrelines a pen would draw.
- [the redirect that broke my link preview](https://sanyam.sh/blogs/the-redirect-that-broke-my-link-preview), 2026-08-04, 4 min read
  A 307 between an apex domain and www is enough to stop X rendering your og:image. What a redirect does, why 308 matters, and the one line that must agree.
- [state-based dropdown trigger styling](https://sanyam.sh/blogs/state-based-dropdown-trigger-styling), 2025-12-11, 3 min read
  Why a dropdown trigger should visually reflect its own open state, and how aria-expanded does it in one line of CSS rather than component state.
- [modeling link navigation state with useTransition + useOptimistic](https://sanyam.sh/blogs/modeling-link-navigation-state-with-usetransition-and-useoptimistic), 2025-11-01, 7 min read
  A production-ready pattern for modelling link pending state with React transitions and optimistic updates. No timers, no cleanup, no stale spinner.
- [Recreating Stream Text Animation Hook](https://sanyam.sh/blogs/recreating-stream-text-animation-hook), 2024-12-15, 5 min read
  re-creating the popular one-liner hook to add text reveal animation to streams of incoming strings from external LLM sources or backend API responses.
- [Understanding tRPC using Next.js](https://sanyam.sh/blogs/understanding-trpc-using-nextjs), 2023-03-19, 7 min read
  End-to-end typesafe APIs with tRPC and Next.js. Initialising the router, creating hooks with batching, wiring _app.tsx and consuming it client side.
