honojs / honox

HonoX - Hono based meta framework
https://hono.dev
MIT License
1.66k stars 44 forks source link

Partials #166

Open mfulton26 opened 6 months ago

mfulton26 commented 6 months ago

What is the feature you are proposing?

Maybe there is a better name for this but I'd like to be able to change routes (e.g. clicking a link) and if the page I'm navigating to has some of the same content (e.g. header, footer, sidebar, etc.) then the inner HTML gets updated with the diff rather than loading an entirely new document.

This will cause the app to feel like a single page app from the user's perspective (even though it's really a multiple page app).

This will also help retain state for input, select, textarea, etc. as well as for more complicated things like a Google Maps rendering on the page where navigating around keeps the map loaded but other content around or on the map change as the route changes.

yusukebe commented 5 months ago

I also want to the feature like it. The Fresh has a similar feature named Partials: https://fresh.deno.dev/docs/concepts/partials

goisaki commented 2 months ago

Related: https://github.com/honojs/hono/pull/1946