aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-03-08 12:16:10 +0100
committerHayleigh Thompson <me@hayleigh.dev>2024-03-08 12:16:10 +0100
commit77ff5b2ec163cc8010f2b0727fef293796819d60 (patch)
tree2d3e93603ec105b2db81d5e399f72294f8d40469 /examples
parent70a92a2f90720f9f9af62b810f2e714c54c27896 (diff)
downloadlustre-77ff5b2ec163cc8010f2b0727fef293796819d60.tar.gz
lustre-77ff5b2ec163cc8010f2b0727fef293796819d60.zip
:memo: Note that documentation is written for v4 not v3.
Diffstat (limited to 'examples')
-rw-r--r--examples/01-hello-world/README.md4
-rw-r--r--examples/02-interactivity/README.md4
-rw-r--r--examples/03-controlled-inputs/README.md4
-rw-r--r--examples/04-custom-event-handlers/README.md4
-rw-r--r--examples/05-http-requests/README.md4
-rw-r--r--examples/06-custom-effects/README.md4
-rw-r--r--examples/06-custom-effects/header.pngbin0 -> 219045 bytes
7 files changed, 24 insertions, 0 deletions
diff --git a/examples/01-hello-world/README.md b/examples/01-hello-world/README.md
index 0967e7d..aabaab2 100644
--- a/examples/01-hello-world/README.md
+++ b/examples/01-hello-world/README.md
@@ -2,6 +2,10 @@
# 01 Hello World
+> **Note**: this guide is written for Lustre v4. The latest stable release of
+> Lustre is v3. To follow along with this guide, you need to _manually_ edit your
+> `gleam.toml` and change the required version of lustre to `"4.0.0-rc.2"`.
+
This hello world example is a tiny example of what you need to put together to
get a Lustre application running. In later examples we'll touch on server-side
rendering and Lustre Universal Components but for these first examples we'll
diff --git a/examples/02-interactivity/README.md b/examples/02-interactivity/README.md
index ba9c60c..0f654c4 100644
--- a/examples/02-interactivity/README.md
+++ b/examples/02-interactivity/README.md
@@ -2,6 +2,10 @@
# 02 Interactivity
+> **Note**: this guide is written for Lustre v4. The latest stable release of
+> Lustre is v3. To follow along with this guide, you need to _manually_ edit your
+> `gleam.toml` and change the required version of lustre to `"4.0.0-rc.2"`.
+
In this example we show the basic structure of all Lustre applications with a
classic counter example.
diff --git a/examples/03-controlled-inputs/README.md b/examples/03-controlled-inputs/README.md
index 46c0d74..4696c6d 100644
--- a/examples/03-controlled-inputs/README.md
+++ b/examples/03-controlled-inputs/README.md
@@ -2,6 +2,10 @@
# 03 Controlled Inputs
+> **Note**: this guide is written for Lustre v4. The latest stable release of
+> Lustre is v3. To follow along with this guide, you need to _manually_ edit your
+> `gleam.toml` and change the required version of lustre to `"4.0.0-rc.2"`.
+
The most common way to handle inputs and other state-holding elements is in a
_controlled_ way. This means your app's model is the source of truth for that
element's state, and you update that state based on user input or other events.
diff --git a/examples/04-custom-event-handlers/README.md b/examples/04-custom-event-handlers/README.md
index 9330b02..2c7553d 100644
--- a/examples/04-custom-event-handlers/README.md
+++ b/examples/04-custom-event-handlers/README.md
@@ -1,5 +1,9 @@
# 04 Custom Event Handlers
+> **Note**: this guide is written for Lustre v4. The latest stable release of
+> Lustre is v3. To follow along with this guide, you need to _manually_ edit your
+> `gleam.toml` and change the required version of lustre to `"4.0.0-rc.2"`.
+
We haven't quite got round to documenting this example yet. If you know a little
bit about Lustre or Elm and want to help out, we'd love to have your help! Please
[open an issue](https://github.com/lustre-labs/lustre/issues/new) if you have any
diff --git a/examples/05-http-requests/README.md b/examples/05-http-requests/README.md
index d96e0da..2773713 100644
--- a/examples/05-http-requests/README.md
+++ b/examples/05-http-requests/README.md
@@ -2,6 +2,10 @@
# 04 HTTP Requests
+> **Note**: this guide is written for Lustre v4. The latest stable release of
+> Lustre is v3. To follow along with this guide, you need to _manually_ edit your
+> `gleam.toml` and change the required version of lustre to `"4.0.0-rc.2"`.
+
We haven't quite got round to documenting this example yet. If you know a little
bit about Lustre or Elm and want to help out, we'd love to have your help! Please
[open an issue](https://github.com/lustre-labs/lustre/issues/new) if you have any
diff --git a/examples/06-custom-effects/README.md b/examples/06-custom-effects/README.md
index 51be368..3e6abf8 100644
--- a/examples/06-custom-effects/README.md
+++ b/examples/06-custom-effects/README.md
@@ -1,5 +1,9 @@
# 06 Custom Effects
+> **Note**: this guide is written for Lustre v4. The latest stable release of
+> Lustre is v3. To follow along with this guide, you need to _manually_ edit your
+> `gleam.toml` and change the required version of lustre to `"4.0.0-rc.2"`.
+
We haven't quite got round to documenting this example yet. If you know a little
bit about Lustre or Elm and want to help out, we'd love to have your help! Please
[open an issue](https://github.com/lustre-labs/lustre/issues/new) if you have any
diff --git a/examples/06-custom-effects/header.png b/examples/06-custom-effects/header.png
new file mode 100644
index 0000000..1dbbdb0
--- /dev/null
+++ b/examples/06-custom-effects/header.png
Binary files differ