Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Jul 21, 2025

Updates the requirements on leptos to permit the latest version.

Release notes

Sourced from leptos's releases.

v0.8.5: WASM code splitting released!

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) -&gt; AnyView {
    let items = move || {
        Suspend::new(async move {
            this.data
                .await
                .unwrap_or_default()
                .into_iter()
                .map(|item| view! { &lt;li&gt;{item}&lt;/li&gt; })
                .collect::&lt;Vec&lt;_&gt;&gt;()
        })
    };
    view! {
        &lt;p id=&quot;page&quot;&gt;&quot;View D&quot;&lt;/p&gt;
        &lt;hr/&gt;
        &lt;Suspense fallback=|| view! { &lt;p id=&quot;loading&quot;&gt;&quot;Loading...&quot;&lt;/p&gt; }&gt;
            &lt;ul&gt;{items}&lt;/ul&gt;
        &lt;/Suspense&gt;

</tr></table>

... (truncated)

Commits
  • f5d3fbb 0.8.5
  • fbe7cdc docs: update documentation for #[lazy] and #[lazy_route]
  • 14884bc Merge pull request #3988 from leptos-rs/wasm-splitting-support
  • 2c93e1a fix: avoid name conflict between lazy route struct type and split view function
  • 64b8c3d fix: use dummy macro output to improve rust-analyzer experience for `#[lazy_r...
  • 5f2d511 chore: bump oco_ref version number (#4168)
  • d7cdc6c chore: fix Cargo.lock
  • ebb33b6 Merge remote-tracking branch 'origin' into wasm-splitting-support
  • 809c0b5 chore: cargo update
  • b13f242 chore: change name of wasm_split due to namesquatting
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [leptos](https://github.com/leptos-rs/leptos) to permit the latest version.
- [Release notes](https://github.com/leptos-rs/leptos/releases)
- [Commits](leptos-rs/leptos@v0.7.7...v0.8.5)

---
updated-dependencies:
- dependency-name: leptos
  dependency-version: 0.8.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jul 21, 2025
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Jul 28, 2025

Superseded by #12.

@dependabot dependabot bot closed this Jul 28, 2025
@dependabot dependabot bot deleted the dependabot/cargo/leptos-0.8.5 branch July 28, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants