aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Matveyev <info@greenfork.me>2024-03-13 09:25:54 +0300
committerGitHub <noreply@github.com>2024-03-13 07:25:54 +0100
commit1c80731d39b159e86d24ee9f5e61c58d18e1d81c (patch)
treec879d9f3b1d1229aa336ccf70a4f2a9911b9dfcb
parent8ab89947b1cec1b3705b0566a869c4004e94c60c (diff)
downloadlustre-1c80731d39b159e86d24ee9f5e61c58d18e1d81c.tar.gz
lustre-1c80731d39b159e86d24ee9f5e61c58d18e1d81c.zip
🔀 Fix quickstart typos. (#54)
* lustre.Element(Msg) -> element.Element(Msg) * quickstart: fix image link in the final example
-rw-r--r--pages/guide/01-quickstart.md13
1 files changed, 8 insertions, 5 deletions
diff --git a/pages/guide/01-quickstart.md b/pages/guide/01-quickstart.md
index 5909ed9..9b0cf94 100644
--- a/pages/guide/01-quickstart.md
+++ b/pages/guide/01-quickstart.md
@@ -210,7 +210,7 @@ or `Decrement` message when clicked. The Lustre runtime is responsible for
attaching these event listeners and calling your `update` function with the
resulting message.
-> **Note**: notice that the return type of `view` is `lustre.Element(Msg)`. The
+> **Note**: notice that the return type of `view` is `element.Element(Msg)`. The
> type parameter `Msg` tells us the kinds of messages this element might produce
> from events: type safety to the rescue!
@@ -341,7 +341,7 @@ Before we forget, let's also update our `view` function to actually display the
cat images we're fetching:
```gleam
-pub fn view(model: Model) -> lustre.Element(Msg) {
+pub fn view(model: Model) -> element.Element(Msg) {
let count = int.to_string(model.count)
html.div([], [
@@ -352,9 +352,12 @@ pub fn view(model: Model) -> lustre.Element(Msg) {
html.button([event.on_click(Decrement)], [
element.text("-")
]),
- html.div([], list.map(model.cats, fn(cat) {
- html.img([attribute.src(cat)])
- }))
+ html.div(
+ [],
+ list.map(model.cats, fn(cat) {
+ html.img([attribute.src("https://cataas.com/cat/" <> cat)])
+ }),
+ ),
])
}
```