Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jul 28, 2025

This PR contains the following updates:

Package Type Update Change
leptos workspace.dependencies patch 0.8.4 -> 0.8.6
leptos_actix workspace.dependencies patch 0.8.4 -> 0.8.5
leptos_axum workspace.dependencies patch 0.8.4 -> 0.8.5
leptos_meta workspace.dependencies patch 0.8.4 -> 0.8.5
leptos_router workspace.dependencies patch 0.8.4 -> 0.8.5

Release Notes

leptos-rs/leptos (leptos)

v0.8.6

Compare Source

Just a patch release, mostly to support #[server] #[lazy] for lazy server functions.

Going forward, patch releases for various crates will have version numbers that are not coupled to one another, and will only be bumped when they've actually changed; so this release is 0.8.6 for leptos, leptos_macro, and server_fn_macro, but does not arbitrarily bump other packages that haven't changed.

See 0.8.5 for notes on WASM splitting.

What's Changed

Full Changelog: leptos-rs/leptos@v0.8.5...v0.8.6

v0.8.5: : WASM code splitting released!

Compare Source

This release includes WASM code-splitting/lazy-loading support, in tandem with the latest cargo-leptos release.

You can use the lazy_routes example to understand what this means!

Essentially, though, there are two patterns:

  1. Use the #[lazy] macro to make any given function lazy
  2. Use the #[lazy_route] to designate a route with a lazy-loaded view, which is loaded concurrently with the route's data

#[lazy] converts a (sync or async) function into a lazy-loaded async function

#[lazy]
fn deserialize_comments(data: &str) -> Vec<Comment> {
    serde_json::from_str(data).unwrap()
}

#[lazy_route] lets you split routes into a "data" half and a "view" half, which will be concurrently loaded by the router. This works with nested routing: so if you have ViewD and ViewE, then the router will concurrently load D's data, D's (lazy) view, E's data, and E's (lazy) view, before navigating to the page.

struct ViewD {
    data: Resource<Result<Vec<i32>, ServerFnError>>,
}

#[lazy_route]
impl LazyRoute for ViewD {
    fn data() -> Self {
        Self {
            data: Resource::new(|| (), |_| d_data()),
        }
    }

    fn view(this: Self) -> AnyView {
        let items = move || {
            Suspend::new(async move {
                this.data
                    .await
                    .unwrap_or_default()
                    .into_iter()
                    .map(|item| view! { <li>{item}</li> })
                    .collect::<Vec<_>>()
            })
        };
        view! {
            <p id="page">"View D"</p>
            <hr/>
            <Suspense fallback=|| view! { <p id="loading">"Loading..."</p> }>
                <ul>{items}</ul>
            </Suspense>
            <Outlet/>
        }
        .into_any()
    }
}

#[server]
async fn d_data() -> Result<Vec<i32>, ServerFnError> {
    tokio::time::sleep(std::time::Duration::from_millis(250)).await;
    Ok(vec![1, 1, 2, 3, 5, 8, 13])
}

Our whole July stream was dedicated to the topic, if you want more in depth discussion.

What's Changed

Full Changelog: leptos-rs/leptos@v0.8.4...v0.8.5


Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@DanielleHuisman DanielleHuisman merged commit 715e473 into main Jul 28, 2025
8 checks passed
@DanielleHuisman DanielleHuisman deleted the renovate/leptos-monorepo branch July 28, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant