We can also define a page's route with a Route String (for parameterized routes such as /movies/@id) or a Route Function (for full programmatic flexibility).
Render Control
Unlike Nuxt, we control how our pages are rendered.
You may see import { createSSRApp, h } from 'vue' for the first time,
but every SSR app actually uses createSSRApp and h.
Nuxt abstracts this away from us and gives us a slightly faster getting started. But this also means that we
lose control over a central piece of our app architecture and
we'll eventually lose more time circumventing Nuxt's limiting black box.
This control enables us to easily and naturally integrate any tool we want (Vuex, GraphQL, Service Worker, ...).
Note how we defined the files onRenderClient.js and onRenderHtml.js in a directory called /renderer/: that way, we tell Vike to apply the onRenderHtml() and onRenderClient() hooks to all our pages.
This means we can now create a new page just by defining a new +Page.jsx file (the +route.js file is optional).
Plus files in /renderer/ can be overridden. For example, we can override the onRenderHtml() and onRenderClient() hooks for rendering some of
our pages with a completely different UI framework such as React.
Data Fetching
Let's now have a look at how to fetch data.
That's it for the tour and we have actually already seen most of Vike's interface;
not only is Vike flexible but it's also simple to use!