Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify SSR Docs #185

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion pages/guide/05-server-side-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions pages/guide/06-full-stack-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pages/guide/08-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down