Build Your Own Router Published 2025-11-11, About 8 minute read. URLPattern just became available in all browsers: So I wanted to dig into what it would take to make a simple SPA router with vanilla JavaScript and browser APIs. We should be able to make a component that takes in a router configuration and renders the appropriate component determined by the browser URL. What does URLPattern() Do?…