1 unstable release

0.1.0 Apr 27, 2024

#807 in HTTP server

Download history 209/week @ 2024-04-26 28/week @ 2024-05-03

237 downloads per month
Used in reactive_graph

MIT license

30KB
525 lines

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.


lib.rs:

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.

Dependencies

~1.1–2.1MB
~42K SLoC