This task can be performed using Eleva.js
Pure JavaScript, Pure Performance, Simply Elegant.
Best product for this task

Eleva.js
dev-tools
A minimalist, lightweight, pure vanilla JavaScript frontend runtime framework.
JavaScriptFrontendFrameworkFrontend FrameworkDeveloper ToolsOpen SourceWeb DevelopmentDev ToolsEleva.jsEleva

What to expect from an ideal product
- Uses plain JavaScript without bulky dependencies or complex toolchains
- Loads pages on-demand without reloading the entire site
- Keeps code simple and clean with a tiny runtime footprint
- Makes routing easy without extra libraries or plugins
- Handles state changes smoothly using native browser features