From 9d0aa7738449ac70787dfced639b0573432ee005 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Wed, 27 Mar 2024 20:57:14 +0000 Subject: :memo: Update examples docs. --- examples/06-custom-effects/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'examples/06-custom-effects/README.md') diff --git a/examples/06-custom-effects/README.md b/examples/06-custom-effects/README.md index f8ad49f..fe6822b 100644 --- a/examples/06-custom-effects/README.md +++ b/examples/06-custom-effects/README.md @@ -5,6 +5,18 @@ bit about Lustre or Elm and want to help out, we'd love to have your help! Pleas [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). +## Another note on message naming + +In our [controlled inputs example](https://github.com/lustre-labs/lustre/tree/main/examples/03-controlled-inputs) +we touched on the idea of naming messages in a "Subject Verb Object" pattern. This +example neatly shows the benefits of taking such an approach once different "things" +start talking to your application. + +It would be easy to have a single `SetMessage` variant that both the user input +and local storage lookup use to update the model, but doing so might encourage +us to conceal the fact that the local storage lookup can fail and makes it harder +to see what things our app deals with. + ## Getting help If you're having trouble with Lustre or not sure what the right way to do -- cgit v1.2.3