You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perseus currently actually has two routing systems: one for the client (which is based on Sycamore), and an unrelated system on the server. However, the latter is all that's actually required.
The rationale behind this is that we already know everything about every page in the user's app except for the pages rendered with ISR, which are already handled by the old server-side algorithms. By using those, we'll be able to only perform routing on the client-side, and the server can act as an intermediary to static files (with request-time rendering strategies being applied there).
This will achieve much tighter integration between templates and routing, as it requires no specification of any paths like /post/<slug..> whatsoever (again, Perseus isn't an SPA, we already know almost everything about routing at build-time from the templates). This means that the system of template root paths is now far more important, as it defines exactly how routing will work. This will be documented closely for v0.2.0.
The only caveat of this approach that I see right now is no (current) support for dynamic parameters that come before the template root path, like i18n. As with that system, this would have to be implemented at a lower level outside the router. I'll think on possible ways to integrate this into the template-based routing systems.
The text was updated successfully, but these errors were encountered:
Perseus currently actually has two routing systems: one for the client (which is based on Sycamore), and an unrelated system on the server. However, the latter is all that's actually required.
The rationale behind this is that we already know everything about every page in the user's app except for the pages rendered with ISR, which are already handled by the old server-side algorithms. By using those, we'll be able to only perform routing on the client-side, and the server can act as an intermediary to static files (with request-time rendering strategies being applied there).
This will achieve much tighter integration between templates and routing, as it requires no specification of any paths like
/post/<slug..>
whatsoever (again, Perseus isn't an SPA, we already know almost everything about routing at build-time from the templates). This means that the system of template root paths is now far more important, as it defines exactly how routing will work. This will be documented closely for v0.2.0.The only caveat of this approach that I see right now is no (current) support for dynamic parameters that come before the template root path, like i18n. As with that system, this would have to be implemented at a lower level outside the router. I'll think on possible ways to integrate this into the template-based routing systems.
The text was updated successfully, but these errors were encountered: