diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-03-31 10:56:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-31 10:56:36 +0100 |
commit | f45179f9124fb002e910afb618911c79a4a1549f (patch) | |
tree | 64aa1190458124a5556481c4d4b0bcb8db7c1c6b /src/lustre.gleam | |
parent | b6aea6702d762986a69f5660df78459ef81a2e9b (diff) | |
download | lustre-f45179f9124fb002e910afb618911c79a4a1549f.tar.gz lustre-f45179f9124fb002e910afb618911c79a4a1549f.zip |
🔀 Refactor vdom and add support for keyed vnodes. (#83)
* :truck: Keep around old vdom implementation for reference.
* :sparkles: Add a keyed vdom node.
* :alembic: Experiment with a different approach for handling component children.
* :construction: Here be scary works in progress.
* :sparkles: Implement keyed node diffing.
* :recycle: Don't use deprecated 'isOk' checks.
* :recycle: Remove separate Keyed node and add 'key' field to Element node.
* :sparkles: Add support for server components into new vdom.
* :bug: Fix broken build script.
* :recycle: Don't emit data-lustre-key attributes for server component patches.
* :package: Generate server component runtime.
* :bug: Fixed a bug where server component keys were ambiguous when double digit.
* :package: Generate server component runtime.
* :recycle: Refactor 'keyed' element to force all children of a node to be keyed.
* :memo: Consistently format '**Note**:'.
* :bug: Fixed bug with falsey className/style/innerHTML attributes.
* :bug: Fixed a bug not handling undefined 'prev' nodes correctly.
* :package: Generate server component runtime.
Diffstat (limited to 'src/lustre.gleam')
-rw-r--r-- | src/lustre.gleam | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lustre.gleam b/src/lustre.gleam index 31861f3..f5b79f9 100644 --- a/src/lustre.gleam +++ b/src/lustre.gleam @@ -343,7 +343,7 @@ pub fn application( /// other HTML element. This dictionary of decoders allows you to specify how to /// decode those attributes into messages your component's update loop can handle. /// -/// **Note:** Lustre components are conceptually a lot "heavier" than components +/// **Note**: Lustre components are conceptually a lot "heavier" than components /// in frameworks like React. They should be used for more complex UI widgets /// like a combobox with complex keyboard interactions rather than simple things /// like buttons or text inputs. Where possible try to think about how to build @@ -406,7 +406,7 @@ fn do_start( /// A server component will keep running until the program is terminated or the /// [`shutdown`](#shutdown) action is sent to it. /// -/// **Note:** Users running their application on the BEAM should use [`start_actor`](#start_actor) +/// **Note**: Users running their application on the BEAM should use [`start_actor`](#start_actor) /// instead to make use of Gleam's OTP abstractions. /// @external(javascript, "./server-runtime.ffi.mjs", "start") @@ -423,7 +423,7 @@ pub fn start_server_component( /// a [`Subject`](https://hexdocs.pm/gleam_erlang/gleam/erlang/process.html#Subject) /// /// -/// **Note:** This function is only meaningful on the Erlang target. Attempts to +/// **Note**: This function is only meaningful on the Erlang target. Attempts to /// call it on the JavaScript will result in the `NotErlang` error. If you're running /// a Lustre server component on Node or Deno, use [`start_server_component`](#start_server_component) /// instead. @@ -463,12 +463,12 @@ fn do_start_actor( /// with the name `my-component`, you'd use it in HTML by writing `<my-component>` /// or in Lustre by rendering `element("my-component", [], [])`. /// -/// **Note:** There are [some rules](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names) +/// **Note**: There are [some rules](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names) /// for what names are valid for a Custom Element. The most important one is that /// the name *must* contain a hypen so that it can be distinguished from standard /// HTML elements. /// -/// **Note:** This function is only meaningful when running in the browser and will +/// **Note**: This function is only meaningful when running in the browser and will /// produce a `NotABrowser` error if called anywhere else. For server contexts, /// you can render a Lustre server component using [`start_server_component`](#start_server_component) /// or [`start_actor`](#start_actor) instead. |