From cde438d67b80f10ed8f511f665a93d8d255a6e24 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Thu, 2 May 2024 16:15:29 -0400 Subject: [PATCH] Update 26_extractors.md --- src/server/26_extractors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/26_extractors.md b/src/server/26_extractors.md index c87d2c1..ead7def 100644 --- a/src/server/26_extractors.md +++ b/src/server/26_extractors.md @@ -102,7 +102,7 @@ This context can then be accessed with a simple `use_context::()` inside your If you *need* to use `State` in a server function—for example, if you have an existing Axum extractor that requires `State`, that is also possible using Axum's [`FromRef`](https://docs.rs/axum/latest/axum/extract/derive.FromRef.html) pattern and [`extract_with_state`](https://docs.rs/leptos_axum/latest/leptos_axum/fn.extract_with_state.html). Essentially you'll need to provide the state both via context and via Axum router state: ```rust -#[derive(FromRef, Debug, Clone, Copy)] +#[derive(FromRef, Debug, Clone)] pub struct MyData { pub value: usize, pub leptos_options: LeptosOptions,