Server-side rendering
Aesthetic supports server-side rendering and client-side hydration (this happens automatically). However, it does require a bit of setup.
#
ServerOn the server, we'll need to import and call createServerEngine()
from @aesthetic/style/server
to extract critical CSS with extractStyles()
. In the example below, we'll use
Express as our server.