Skip to content
Back to skills

Leptos Knowledge Patch

ASecurity

Leptos

  • 25 stars
  • 0 votes
  • 0 copies
  • 13 views
  • Added September 5, 2026
developmentrustgoshellreactapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill leptos-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Leptos Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Leptos Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-leptos-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-leptos-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: leptos-knowledge-patch
description: Leptos
version: "0.8.23"
license: MIT
metadata:
  author: Nevaberry
---


# Leptos Knowledge Patch

Load this skill for Leptos migrations, component and attribute APIs, reactive
resources and stores, routing, SSR, server functions, lazy loading, and
`cargo-leptos` configuration or installation.

## Reference index

| Reference | Topics |
| --- | --- |
| [Migration and Configuration](references/migration-and-configuration.md) | Custom conversions, options, crate versions, stylesheets, development flags, reload, source locations |
| [Reactivity, Resources, and Stores](references/reactivity-and-stores.md) | Callable signals, batching, selectors, resources, error boundaries, conversions, keyed stores |
| [Routing, SSR, and Integrations](references/routing-ssr-and-integrations.md) | Axum, protected routes, islands, transitions, parameters, redirects, origins, CSP, hydration scripts |
| [Server Functions and Lazy Loading](references/server-functions-and-lazy-loading.md) | Errors, codecs, Actix, WebSockets, server URLs, body limits, forms, lazy routes and functions |
| [Views, Components, and Browser APIs](references/views-components-and-browser.md) | DOM helpers, toggle events, attributes, radio binding, recursive views, props, optional values, keyed lists |
| [cargo-leptos](references/cargo-leptos.md) | Prebuilt installers, manual archives, checksums, supported platforms |

## Breaking changes and migrations

### Signals and closures

In 0.9.0-beta, signals dereference to callable values on stable and nightly Rust.
Change props accepting both signals and closures from `impl Fn() -> T` to
`impl SignalOrFn<Output = T>`: signals no longer implement the `Fn` traits
directly on nightly.

```rust
use leptos::prelude::*;

let (count, set_count) = signal(42);
set_count(13);
assert_eq!(count(), 13);
```

### Lazy-loading feature and form encoding

In 0.9.0-beta, enable the `lazy` feature on the `leptos` dependency to continue
using lazy loading and WASM code splitting.

```toml
[dependencies]
leptos = { version = "0.9.0-beta", features = ["lazy"] }
```

The default URL-encoded server-function input in 0.9.0-beta uses `serde_qs` 1.0.
Retest empty collections: they may decode without the `#[server(default)]`
workarounds used with the older codec.

### DOM helpers, events, and removed rendering API

- In 0.9.0-beta, switch handle-returning helpers from `_with_handle` names to
  their unsuffixed names.
- In 0.9.0-beta, `on:toggle` receives `ToggleEvent`; update callbacks explicitly
  taking a plain `Event`.
- `render_app_async_stream_with_context` was removed in 0.9.0-beta. Update
  integrations that call it directly.

### Custom conversions and configuration

- For custom view children in 0.7.0, migrate `IntoView` implementations to
  `IntoRender`; for custom HTML attribute values, migrate `IntoAttribute`
  implementations to `IntoAttributeValue`.
- In 0.7.0, former `String` fields in `LeptosOptions` use `Arc<str>`; pass
  `field.as_ref()` to APIs needing `&str`.
- In 0.8.0, replace `LeptosOptions::default()` and `ConfFile::default()` with
  explicit construction or `get_configuration(None)?.leptos_options`.
- Starting in 0.8.6, workspace crates receive patch releases independently;
  choose each crate's published version when pinning dependencies.

### Axum integration

For Leptos 0.8.0, upgrade Axum to 0.8 alongside `leptos_axum` so their types
match. Use brace paths such as `/posts/{id}` and `/files/{*rest}` for routes
registered directly on Axum's router.

The 0.9.0-beta integration can leave a non-unit state type on the router, allowing
composition with other routes before supplying the remaining state.

### Reactive value migrations

- In 0.7.0, reactive updates batch automatically. Remove `batch` calls and run
  their bodies directly.
- In 0.8.0, `LocalResource` exposes values directly. Remove dereferences used
  solely to unwrap `SendWrapper`; update action code explicitly using the former
  `SendOption` wrapper to use ordinary `Option`.
- In 0.8.0, pass keys to `Selector::selected` by reference:
  `selector.selected(&key)`.
- Starting in 0.8.11, `effect::immediate::batch(|| { /* signal writes */ })`
  defers immediate effects until the batch finishes.

## Components and attributes

### Attribute forwarding

Use `attr:` for individual HTML attributes or `{..}` after component props to
treat subsequent entries as attributes. Spread attributes apply to each rendered
root element and can pass through wrappers such as `Suspense`.

```rust
view! { <A href="/" attr:aria-label="Home" {..} class="nav-link">"Home"</A> }
```

Starting in 0.7.1, `<AttributeInterceptor>` captures spread attributes for
forwarding to a chosen element inside a wrapper component.
Starting in 0.7.5, `TextProp` can be an HTML attribute value; starting in 0.8.16,
`MaybeProp` implements `AttributeValue` and can be passed directly as well.

### Binding and optional rendering

Use `bind:group` with the same writable `String` signal on each radio input;
the signal holds the selected input's `value`.
End recursive component views with `.into_any()` so the compiler can determine
the size of the view tree.

`<ShowLet>` renders a reactive `Option`'s value and uses its fallback for `None`
starting in 0.8.8. Starting in 0.8.15, it also accepts a plain `Option`.

## Resources and stores

Starting in 0.8.3, put reads that should trigger a refetch in the source closure
passed to `Resource::new`. Reads inside the fetcher's `async` block are untracked.
Use `Resource::write()` to mutate a resource's stored value directly.

In 0.8.21, errors inside a `<Suspense>` tracking only `LocalResource` values reach
the enclosing `<ErrorBoundary>`. Resource-read checks also apply to attributes
whose `Signal` or `Memo` reads a resource.

Starting in 0.8.21, convert a reactive store subfield directly into a `MaybeProp`,
for example `let tooltip: MaybeProp<String> = store.tooltip().into();`.
Starting in 0.8.19, patches changing a keyed collection's structure notify
subscribers of that structural change.

## Routing and SSR

`<ProtectedRoute>` reevaluates its condition as reactive state changes and uses
`Suspense` for resource-backed conditions. In 0.8.0, enable `islands-router` for
client-side navigation while hydrating an islands app's interactive islands.

Set `transition=true` on `<Routes>` or `<FlatRoutes>` for browser View Transition
API navigation. On `<html>`, use `.routing-progress`, `.router-back`, and
`.router-outlet-0`, `.router-outlet-1`, and so on for navigation, back navigation,
and the depth of the changing outlet, respectively.

`ParamsMap` can preserve repeated query values. Starting in 0.8.16,
`#[derive(Params)]` works without nightly, and `for entry in &params` iterates a
borrowed map while retaining it for later use.

In 0.8.0, server-rendered router fallbacks can set a custom HTTP status or
redirect; use `leptos_axum::ResponseOptions` for an Axum fallback's status.
In 0.9.0-beta, permanent router redirects emit HTTP 301 on the server, and the
server-side `Url::origin()` returns the actual request origin for absolute URLs.

Starting in 0.8.19 and 0.9.0-beta, use `Nonce::from_value` for an existing CSP
nonce, using the same nonce in the CSP header and rendered markup. In 0.8.21,
`use_nonce()` is available even without the `nonce` Cargo feature, and the
generated WebAssembly preload uses the active CSP nonce.

Starting in 0.8.23, request deferred script execution in the server-rendered
document shell:

```rust
view! { <HydrationScripts options defer=true /> }
```

## Server functions and code splitting

In 0.8.0, a `#[server]` function can return `Result<T, AppError>` when `AppError`
implements `FromServerFnError`; result aliases are accepted too.
For WebSocket server functions, select `Websocket<InputEncoding, OutputEncoding>`
and accept and return `BoxedStream` values. Open the connection from client-side
code and consume the returned stream for incoming messages.

Starting in 0.8.19, primary non-multipart server-function encodings honor the web
framework's request-body limit. For large requests, adjust Axum's
`DefaultBodyLimit` or Actix's `PayloadConfig`.

Starting in 0.8.5, implement `LazyRoute` with `#[lazy_route]` for WASM route
splitting; route data and views start loading concurrently, including nested
routes. Starting in 0.8.6, put `#[server]` above `#[lazy]` to split a server
function's client-side WASM code. Starting in 0.8.19, `lazy_preload!` can load a
`#[lazy]` function's WASM code ahead of its call.

## Build and stylesheet settings

Switch `<Stylesheet>` to `<HashedStylesheet>` when using `cargo-leptos` stylesheet
hashing. Starting in 0.8.18, `LeptosOptions::css_file_path()` resolves the generated
stylesheet's path on disk.

The `cargo-leptos` release paired with Leptos 0.8.0 enables
`--cfg=erase_components` for development by default; with Trunk, set it explicitly
for development builds. View hot reloading works on stable Rust starting in
0.8.4. Starting in 0.7.1, opt in to reactive source locations in release builds
with `RUSTFLAGS="--cfg locations" cargo build --release`.

Files in this skill

  • SKILL.md8.4 KB
  • coverage.json641 B
  • references/cargo-leptos.md1.4 KB
  • references/migration-and-configuration.md2.4 KB
  • references/reactivity-and-stores.md2.7 KB
  • references/routing-ssr-and-integrations.md2.9 KB
  • references/server-functions-and-lazy-loading.md2.5 KB
  • references/views-components-and-browser.md2.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.