Server and client pages in the same app #2259
andresgutgon
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What?
Hi everyone,
I came across this discussion and wanted to share some thoughts. As mentioned in the thread, it would be beneficial for the Inertia protocol to explicitly indicate when a page has been server-rendered. This would allow the client to handle hydration or treat the page appropriately as a client-side page.
Currently, we can achieve this by manually assigning a custom prop:
However, since the
render
method already has knowledge of whether the page is server-rendered, it would be great if this information were included as part of the standard Inertia response.For example:
This small addition could improve client-side behavior without requiring a manual workaround. Would love to hear thoughts on whether this could be considered as an enhancement!
Thanks for all the great work on this project! 🚀
Beta Was this translation helpful? Give feedback.
All reactions