@alloc/ui-box
Fork of ui-box
with Vite support
SSR hydration
On the server-side, call getHydrateScript
to retrieve the <script>
tag that injects the cached class names and computed CSS. You should include the script at the end of your <head>
element.
For this to work optimally, you'll want to ensure the <html>
tag has its font-size
set (based on the screen width) before the hydration script is executed. Otherwise, rem
units won't be properly converted into px
units (which is necessary to avoid subpixel rounding errors).