This repository has been archived by the owner on Nov 23, 2023. It is now read-only.
This release fixes a bug where it was not possible to change the route context's state
from within a route component and see the changes reflected in the hydration payload. Previously the only way to change state
was via the default function in context.js
.
The starter template's index.html
also changed slightly, with hydration
moved after element
:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="./base.css">
<!-- head -->
- <!-- hydration -->
</head>
<body>
<main><!-- element --></main>
</body>
+ <!-- hydration -->
<script type="module" src="/dx:mount.js"></script>
</html>
Note that currently only state
and data
are automatically hydrated.
Fixes
- fix(svelte): hydration order
- feat(svelte): allow state changes to be serialized into hydration payload