From 0148d92f48c609b62901cead05737567b95a6403 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 27 Apr 2024 11:11:18 -0400 Subject: [PATCH] prep for preview release --- hydration_context/Cargo.toml | 8 +++++++- hydration_context/README.md | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 hydration_context/README.md diff --git a/hydration_context/Cargo.toml b/hydration_context/Cargo.toml index aba9fa13c..c952da141 100644 --- a/hydration_context/Cargo.toml +++ b/hydration_context/Cargo.toml @@ -1,7 +1,13 @@ [package] name = "hydration_context" edition = "2021" -version.workspace = true +version = "0.1.0" +authors = ["Greg Johnston"] +license = "MIT" +readme = "../README.md" +repository = "https://github.com/leptos-rs/leptos" +description = "Utilities for sharing data between web servers and client-side web applications." +rust-version.workspace = true [dependencies] throw_error = { workspace = true } diff --git a/hydration_context/README.md b/hydration_context/README.md new file mode 100644 index 000000000..dd6c4dac7 --- /dev/null +++ b/hydration_context/README.md @@ -0,0 +1,10 @@ +Isomorphic web applications that run on the server to render HTML, then add interactivity in +the client, need to accomplish two tasks: + +1. Send HTML from the server, so that the client can "hydrate" it in the browser by adding + event listeners and setting up other interactivity. +2. Send data that was loaded on the server to the client, so that the client "hydrates" with + the same data with which the server rendered HTML. + +This crate helps with the second part of this process. It provides a [`SharedContext`] type +that allows you to store data on the server, and then extract the same data in the client.