Skip to content

Commit

Permalink
Update islands.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj authored Mar 27, 2024
1 parent 9fe593a commit 1af623c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/islands.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Nothing happens!

Perfect.

```admonish note
The starter templates include `use app::*;` in their `hydrate()` function definitions. Once you've switched over to islands mode, you are no longer using the imported main `App` function, so you might think you can delete this. (And in fact, Rust lint tools might issue warnings if you don't!)
However, this can cause issues if you are using a workspace setup. We use `wasm-bindgen` to independently export an entrypoint for each function. In my experience, if you are using a workspace setup and nothing in your `frontend` crate actually uses the `app` crate, those bindings will not be generated correctly. [See this discussion for more](https://github.com/leptos-rs/leptos/issues/2083#issuecomment-1868053733).
```

## Using Islands

Nothing happens because we’ve just totally inverted the mental model of our app. Rather than being interactive by default and hydrating everything, the app is now plain HTML by default, and we need to opt into interactivity.
Expand Down

0 comments on commit 1af623c

Please sign in to comment.