client-side-routing-patterns

Installation
SKILL.md

Client-Side Routing Patterns

Skill Resources

Modern client-side routing is built on two browser primitives: history.pushState / history.replaceState and the popstate event. Understanding these directly makes every router less magical and easier to debug.


History API Fundamentals

// pushState: add a new history entry (browser Back button goes back)
history.pushState(
  { key: 'some-state' }, // State object (serializable; retrieve via history.state)
  '',                    // Title — browsers ignore this; pass empty string
  '/new-path?q=foo',     // URL to display
);
Installs
1
GitHub Stars
14
First Seen
Jun 5, 2026
client-side-routing-patterns — opensite-ai/opensite-skills