diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-02-23 00:48:31 +0000 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-02-23 00:48:31 +0000 |
commit | 16d8c583f7b42a8789d04d4b3b0f0bf0282832fa (patch) | |
tree | ad66b853ce4742b8cedec7e36cfbb16e890fe250 /src | |
parent | bc7e66cd198c8db9eb0607b51f0f5bbb3674b4de (diff) | |
download | lustre-16d8c583f7b42a8789d04d4b3b0f0bf0282832fa.tar.gz lustre-16d8c583f7b42a8789d04d4b3b0f0bf0282832fa.zip |
:memo: Document that javascript server components are currently unsupported.
Diffstat (limited to 'src')
-rw-r--r-- | src/lustre/server.gleam | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lustre/server.gleam b/src/lustre/server.gleam index 4eaabd1..35e1ecb 100644 --- a/src/lustre/server.gleam +++ b/src/lustre/server.gleam @@ -1,3 +1,10 @@ +//// +//// +//// **Note**: while Lustre v4 is in release candidate status, server components +//// **will not reliably work on Gleam's JavaScript target**. Until this message +//// goes away, consider server components as being supported **only** on Erlang. +//// + // IMPORTS --------------------------------------------------------------------- import gleam/bool @@ -19,7 +26,7 @@ import lustre/internals/patch /// server components are not opinionated about your network layer or how your /// wider application is organised, it is your responsibility to make sure a `Patch` /// makes its way to the server component client runtime. -/// +/// pub type Patch(msg) = patch.Patch(msg) @@ -122,8 +129,8 @@ fn do_set_selector(_sel: Selector(Action(runtime, msg))) -> Effect(msg) { // DECODERS -------------------------------------------------------------------- -/// -/// +/// +/// pub fn decode_action( dyn: Dynamic, ) -> Result(Action(runtime, msg), List(DecodeError)) { @@ -175,7 +182,7 @@ fn decode_attr(dyn: Dynamic) -> Result(#(String, Dynamic), List(DecodeError)) { // ENCODERS -------------------------------------------------------------------- /// -/// +/// pub fn encode_patch(patch: Patch(msg)) -> Json { patch.patch_to_json(patch) } |