From 7c3d5f1511cc14a121a3be90dd00e043678ddea8 Mon Sep 17 00:00:00 2001 From: Ofek Doitch Date: Mon, 23 Sep 2024 18:19:23 +0300 Subject: [PATCH 1/3] docs: fix typo --- pages/guide/08-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/guide/08-components.md b/pages/guide/08-components.md index e17f41f..dca07ef 100644 --- a/pages/guide/08-components.md +++ b/pages/guide/08-components.md @@ -4,7 +4,7 @@ > creating components with Lustre. -# 06 Components +# 08 Components In the previous chapters of this guide we have explored the Model-View-Update architecture and stressed the importance of having a _single source of truth_ in From a9350afac45611489d6e846823d107eb25eb6c23 Mon Sep 17 00:00:00 2001 From: Ofek Doitch Date: Mon, 23 Sep 2024 18:21:08 +0300 Subject: [PATCH 2/3] docs: reword the universal feature Clairfying this feature has caused the feature list flow to read differently, so other minor adjustments were made --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 29eabfc..aeaf59e 100644 --- a/README.md +++ b/README.md @@ -64,19 +64,17 @@ ## Features +- **Unparalleled flexibility.** Run in the browser, render on the server, or diff + over the wire **only where you need it**. Elm meets Phoenix LiveView. + - A **declarative**, functional API for constructing HTML. No templates, no macros, just Gleam. -- An Erlang and Elm-inspired architecture for **managing state**. - -- **Managed side effects** for predictable, testable code. - -- Universal components. **Write once, run anywhere**. Elm meets Phoenix LiveView. +- An Erlang and Elm-inspired state architecture with **Managed side effects** + for predictable, testable code. - A **batteries-included CLI** that makes scaffolding and building apps a breeze. -- **Server-side rendering** for static HTML templating. - ## Example ```gleam From b8b5c7d885c83adb3139b4648e72df7fa25d5a70 Mon Sep 17 00:00:00 2001 From: Ofek Doitch Date: Mon, 23 Sep 2024 18:22:45 +0300 Subject: [PATCH 3/3] docs: clarify the two ways to do ssr --- pages/guide/05-server-side-rendering.md | 9 ++++++++- pages/guide/06-full-stack-applications.md | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pages/guide/05-server-side-rendering.md b/pages/guide/05-server-side-rendering.md index ebc76a7..4decefc 100644 --- a/pages/guide/05-server-side-rendering.md +++ b/pages/guide/05-server-side-rendering.md @@ -3,7 +3,14 @@ Up until now, we have focused on Lustre's ability as a framework for building Single Page Applications (SPAs). While Lustre's development and feature set is primarily focused on SPA development, that doesn't mean it can't be used on the -backend as well! In this guide we'll set up a small [mist](https://hexdocs.pm/mist/) +backend as well! + +Lustre can render on the server in two ways: + +1. Server Side Rendering, where the full rendered view is sent +2. Server Components, which exchange diffs with the client + +In this guide we'll start with the former by setting up a small [mist](https://hexdocs.pm/mist/) server that renders some static HTML using Lustre. ## Setting up the project diff --git a/pages/guide/06-full-stack-applications.md b/pages/guide/06-full-stack-applications.md index 862da41..fa92a94 100644 --- a/pages/guide/06-full-stack-applications.md +++ b/pages/guide/06-full-stack-applications.md @@ -5,9 +5,10 @@ # 06 Full stack applications -We've now seen how Lustre can render single-page applications in the browser, -static HTML templates, and we've seen how hydration can be implemented. In this -guide we'll look at how to put these pieces together into a single application. +We've seen how Lustre can render single-page applications in the browser, and +static HTML templates on the server, powered-up with hydration. In this guide +we'll look at how to put these pieces together and create our first full stack +application, before continuing to Server Components and truly combining the two. To create a full stack Web application in Gleam you will need to adopt a _monorepo_. Although Gleam supports multiple targets, and has conditional