December 5, 2022 · Gridlink
Creating an SSR/SSG application with client-side hydration using Nuxt
Gridlink leverages a combination of three techniques:
Using these techniques provides several benefits, including improved performance and search engine optimization.
With server-side rendering, the server generates the fully-rendered HTML for a page and sends it to the client. This removes the need for the client to render the page on the fly.
This improves the initial load time of the page, as well as making it more accessible to search engines.
Combining server-side rendering with static site generation allows Gridlink to pre-build the HTML for the entire application and serve it from a content delivery network (CDN).
A CDN is a distributed network of servers that can deliver content more efficiently to users, and can help with:
Gridlink leverages client-side hydration to handle dynamic, interactive features on server-rendered pages.
After being served a rendered page, the client's JavaScript bundle takes over and turns the static HTML into dynamic DOM that reacts to client-side data changes. We can then perform asynchronous actions such as fetching from an external API.
In summary, this provides an interactive user experience, without sacrificing the initial load benefits of server-side rendering, with the ability to distribute the application as static files from a CDN.
Using Nuxt to create an SSR/SSG application
Using Tailwind for rapid mark-up development
Layouts
Pages
Components
Using nuxt generate
to build application as static files
Resources