diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/01-hello-world/README.md | 10 | ||||
-rw-r--r-- | examples/02-interactivity/README.md | 10 | ||||
-rw-r--r-- | examples/03-controlled-inputs/README.md | 10 | ||||
-rw-r--r-- | examples/04-custom-event-handlers/README.md | 10 | ||||
-rw-r--r-- | examples/05-http-requests/README.md | 10 | ||||
-rw-r--r-- | examples/06-custom-effects/README.md | 10 | ||||
-rw-r--r-- | examples/README.md | 44 |
7 files changed, 104 insertions, 0 deletions
diff --git a/examples/01-hello-world/README.md b/examples/01-hello-world/README.md index c82b34d..76f420c 100644 --- a/examples/01-hello-world/README.md +++ b/examples/01-hello-world/README.md @@ -79,3 +79,13 @@ $ gleam run -m lustre try --include-styles It's not necessary to use lustre_ui to use Lustre or to check out any of these examples, but the option is there if you want it. + +## Getting help + +If you're having trouble with Lustre or not sure what the right way to do +something is, the best place to get help is the [Gleam Discord server](https://discord.gg/Fm8Pwmy). +You could also open an issue on the [Lustre GitHub repository](https://github.com/lustre-labs/lustre/issues). + +While our docs are still a work in progress, the official [Elm guide](https://guide.elm-lang.org) +is also a great resource for learning about the Model-View-Update architecture +and the kinds of patterns that Lustre is built around. diff --git a/examples/02-interactivity/README.md b/examples/02-interactivity/README.md index bae2f9a..ba9c60c 100644 --- a/examples/02-interactivity/README.md +++ b/examples/02-interactivity/README.md @@ -141,3 +141,13 @@ Starting an application could fail for a number of reasons, so this function returns a `Result`. The `Ok` value is a function you can use to send messages to your running application from the outside world: we'll see more of that in later examples! + +## Getting help + +If you're having trouble with Lustre or not sure what the right way to do +something is, the best place to get help is the [Gleam Discord server](https://discord.gg/Fm8Pwmy). +You could also open an issue on the [Lustre GitHub repository](https://github.com/lustre-labs/lustre/issues). + +While our docs are still a work in progress, the official [Elm guide](https://guide.elm-lang.org) +is also a great resource for learning about the Model-View-Update architecture +and the kinds of patterns that Lustre is built around. diff --git a/examples/03-controlled-inputs/README.md b/examples/03-controlled-inputs/README.md index dff4a76..46c0d74 100644 --- a/examples/03-controlled-inputs/README.md +++ b/examples/03-controlled-inputs/README.md @@ -47,3 +47,13 @@ case msg { ... ``` + +## Getting help + +If you're having trouble with Lustre or not sure what the right way to do +something is, the best place to get help is the [Gleam Discord server](https://discord.gg/Fm8Pwmy). +You could also open an issue on the [Lustre GitHub repository](https://github.com/lustre-labs/lustre/issues). + +While our docs are still a work in progress, the official [Elm guide](https://guide.elm-lang.org) +is also a great resource for learning about the Model-View-Update architecture +and the kinds of patterns that Lustre is built around. diff --git a/examples/04-custom-event-handlers/README.md b/examples/04-custom-event-handlers/README.md index c8d29fd..9330b02 100644 --- a/examples/04-custom-event-handlers/README.md +++ b/examples/04-custom-event-handlers/README.md @@ -4,3 +4,13 @@ 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 ideas or reach out to @hayleigh.dev on the [Gleam discord](https://discord.gg/Fm8Pwmy). + +## Getting help + +If you're having trouble with Lustre or not sure what the right way to do +something is, the best place to get help is the [Gleam Discord server](https://discord.gg/Fm8Pwmy). +You could also open an issue on the [Lustre GitHub repository](https://github.com/lustre-labs/lustre/issues). + +While our docs are still a work in progress, the official [Elm guide](https://guide.elm-lang.org) +is also a great resource for learning about the Model-View-Update architecture +and the kinds of patterns that Lustre is built around. diff --git a/examples/05-http-requests/README.md b/examples/05-http-requests/README.md index 12d3bfc..d96e0da 100644 --- a/examples/05-http-requests/README.md +++ b/examples/05-http-requests/README.md @@ -6,3 +6,13 @@ 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 ideas or reach out to @hayleigh.dev on the [Gleam discord](https://discord.gg/Fm8Pwmy). + +## Getting help + +If you're having trouble with Lustre or not sure what the right way to do +something is, the best place to get help is the [Gleam Discord server](https://discord.gg/Fm8Pwmy). +You could also open an issue on the [Lustre GitHub repository](https://github.com/lustre-labs/lustre/issues). + +While our docs are still a work in progress, the official [Elm guide](https://guide.elm-lang.org) +is also a great resource for learning about the Model-View-Update architecture +and the kinds of patterns that Lustre is built around. diff --git a/examples/06-custom-effects/README.md b/examples/06-custom-effects/README.md index 8abe7dc..51be368 100644 --- a/examples/06-custom-effects/README.md +++ b/examples/06-custom-effects/README.md @@ -4,3 +4,13 @@ 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 ideas or reach out to @hayleigh.dev on the [Gleam discord](https://discord.gg/Fm8Pwmy). + +## Getting help + +If you're having trouble with Lustre or not sure what the right way to do +something is, the best place to get help is the [Gleam Discord server](https://discord.gg/Fm8Pwmy). +You could also open an issue on the [Lustre GitHub repository](https://github.com/lustre-labs/lustre/issues). + +While our docs are still a work in progress, the official [Elm guide](https://guide.elm-lang.org) +is also a great resource for learning about the Model-View-Update architecture +and the kinds of patterns that Lustre is built around. diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..28dcf2e --- /dev/null +++ b/examples/README.md @@ -0,0 +1,44 @@ +# Lustre examples + +Each of the examples in this directory is a self-contained, complete Gleam app +that demonstrates a particular feature or concept of the library. For newcomers, +we recommend looking through them in order, as each example tends to build on +the previous ones. Feel free to jump in to any example that interests you, though! + +**Note**: these examples all use [`lustre/ui`](https://github.com/lustre-labs/ui) +to show off something a little more visually interesting than unstyled HTML. None +of the ideas in these examples are specific to `lustre/ui`, though, and you should +know that you can follow along with any of these examples using only the standard +`lustre/element/html` module. + +## Examples + +- [`01-hello-world`](./01-hello-world) is a simple example to just get something + on the screen. + +- [`02-interactivity`](./02-interactivity) introduces the core Model-View-Update + loop that underpins every Lustre application. + +- [`03-controlled-inputs`](./03-controlled-inputs) demonstrates the most common + way to handle `<input />` elements in Lustre. + +- [`04-custom-event-handlers`](./04-custom-event-handlers) shows you how to + write your own event handlers and decoders, instead of relying on the ones + provided by `lustre/event`. + +- [`05-http-requests`](./05-http-requests) demonstrates how side effects are + handled in Lustre, using the third-party [`lustre_http`](https://hexdocs.pm/lustre_http/) + package. + +- [`06-custom-effects`](./06-custom-effects) builds on the previous example and + shows you how to write your own side effects for Lustre to perform. + +## Getting help + +If you're having trouble with Lustre or not sure what the right way to do +something is, the best place to get help is the [Gleam Discord server](https://discord.gg/Fm8Pwmy). +You could also open an issue on the [Lustre GitHub repository](https://github.com/lustre-labs/lustre/issues). + +While our docs are still a work in progress, the official [Elm guide](https://guide.elm-lang.org) +is also a great resource for learning about the Model-View-Update architecture +and the kinds of patterns that Lustre is built around. |