<Page>
Environment: client, and server if ssr: true
.
The Page
setting determines the root component of the page.
With JSX (React/Solid):
With Vue:
What happens with the Page
value is determined by the UI framework Vike extension vike-react
/vike-vue
/vike-solid
.
Instead of using
vike-react
/vike-vue
/vike-solid
, you can also manually integrate the UI framework yourself, see Withoutvike-{react,vue,solid}
.
Without vike-{react,vue,solid}
Vike itself never uses the Page
value: it just makes the value available at pageContext.Page
.
The pageContext.Page
value is typically used by the onRenderHtml()
and onRenderClient()
hooks: these two hooks essentially determine how the Page
value is rendered to HTML and the DOM.
The UI framework Vike extension vike-react
/vike-vue
/vike-solid
implements the onRenderHtml()
and onRenderClient()
hooks, so that you don't have to implement them: everything just works like a regular frontend framework such as Next.js or Nuxt.
Instead of using vike-react
/vike-vue
/vike-solid
, you can integrate your favorite UI framework yourself: you then have complete control over the UI framework integration.
Here is a minimal example of manually integrating a UI framework:
You can configure in which environment the
Page
value is loaded by usingmeta
.