Hybrid Routing
See original GitHub issueAs mentioned in https://vite-plugin-ssr.com/SR-vs-CR Client Routing provides the best performance while Server Routing provides the simplest architecture.
An alternative is to:
- Dynamically load the HTML of the next page. (No full page-reload: we use
window.fetch()
to load the HTML.) - Dissect that HTML in the browser-side
- Inject the new HTML parts into the DOM
This is common practice outside the JS world, e.g. Ruby on Rails: https://github.com/hotwired/turbo.
The big benefit here is that we keep the simple architecture of Server Routing, while having fast page transitions similar to Client Routing.
Note that Client Routing is still needed for:
- Highest performance (e.g. for things like https://vite-plugin-ssr.com/onBeforeRender-isomorphic)
- Component states that need to be preserved upon page changes
- React Server Components
Server Routing is also still needed for zero browser-side JavaScript.
We could call this Hydrid Routing.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:14 (12 by maintainers)
Top Results From Across the Web
What is Hybrid Routing Protocol (HRP)?
Hybrid Routing Protocol (HRP) is a network routing protocol that combines Distance Vector Routing Protocol (DVRP) and Link State Routing ...
Read more >What Is Hybrid Routing?
What is hybrid routing? It's the best way for wholesalers, distributors, and other B2B enterprises to maximize customer satisfaction while ...
Read more >Link State, Distance Vector, and Hybrid Routing Protocols
A hybrid routing protocol has some characteristics of a link state routing protocol, and some characteristics of a distance vector routing protocol. An...
Read more >Hybrid Protocol - an overview
2.9.1.3 Hybrid Routing. Hybrid protocols utilize the capabilities of both reactive and proactive protocols, and unite them together to achieve better results.
Read more >Hybrid Routing Protocols > Determining IP Routes
Enhanced IGRP (EIGRP ) is a hybrid routing protocol developed by Cisco. EIGRP makes decisions based on metric information it receives from ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ryansolid Thanks for the reply.
@redbar0n Thanks for the resources.
I think it’s too early to tell whether it makes sense: the ecosystem is evolving a lot (e.g. offscreen rendering and server components which both involve the routing process). It’s not clear where things will end up. Let’s wait and see how the dust settles.
For now, supporting Server Routing as well as Client Routing works out for the vast majority of users, if not all.
Closing in the meantime. We can re-open this if a need arises for it.
@brillout you should watch these sections from Ryan and Nikhil’s recent stream on Partial Hydration? + Hybrid Nested Routing (using the Islands Architecture). In a lot of ways it surpasses the Hotwire.dev Turbo + Stimulus approach.