Possible to to render pages directly vs using renderPage(...)
?
#527
Unanswered
coryvirok
asked this question in
Help & Questions
Replies: 1 comment 2 replies
-
You can define additional As for routing, I don't see a rationale for using Express/Fastify instead of VPS. So my recommendation is to use VPS's built-in router unless you have a good reason for not doing so. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! First off, thank you for building VPS. I'm coming from more of a traditional server template architecture and was hoping to use VPS in a similar way.
I'd like to do the following:
GET /user
) create the props forpages/user/index.page.svelte
and render the page to a string before returning the response in my Express/Fastify route handler.E.g.
The issue I'm running into is that it doesn't appear that it's possible to pass props directly to my Page component using
renderPage()
.renderPage()
expects that all prop building happens inonBeforeRender()
or inrender()
. In order to use VPS like I would a Django template, I need to be able to build the props in my Express/Fastify route handler and just pass them through to VPS.I'm initially interested in building an HTML-only experience (i.e. no JS) and potentially adding in hydration later on.
Is this possible?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions