Why I Built an SPA Router for HTML and Web Components
I didn't set out to build a router. I had a project built with HTML and Web Components. It worked, and I was happy with that stack. Then a few sections needed client-side navigation. Most pages needed to remain HTML-first for SEO and the initial render, so rewriting the entire site in React didn't make sense. I added React only to those sections. It solved the routing problem, but now I had React and Web Components in the same project. Maintaining both stacks became the new problem. React wasn't the problem. The combination was.
At some point I started asking a simpler question: if the browser already has a component model, why do I need a second one just to get SPA navigation? I wanted a router that treated HTML and Web Components as the application-not as legacy markup waiting to be replaced. I looked for one. I couldn't find anything that matched the model I had in
Comments
No comments yet. Start the discussion.