Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.
Compare
Choose a tag to compare
@galvez galvez released this 30 Jun 23:46
· 91 commits to main since this release
1f058e7

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

Examples