From 75c27e0b858bdbc7f5b56ac4113ed8137b522d5f Mon Sep 17 00:00:00 2001 From: Alex Lazar Date: Tue, 28 Nov 2023 16:52:01 -0800 Subject: [PATCH] docs: fix book chapter 3.9 #3 (#2053) * Fix book chapter 3.9 #3 * Add note about Layout and Content --- docs/book/src/view/08_parent_child.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/book/src/view/08_parent_child.md b/docs/book/src/view/08_parent_child.md index 73d96c6437..b9c7789f9a 100644 --- a/docs/book/src/view/08_parent_child.md +++ b/docs/book/src/view/08_parent_child.md @@ -151,7 +151,7 @@ pub fn App() -> impl IntoView { #[component] -pub fn ButtonC() -> impl IntoView { +pub fn ButtonC() -> impl IntoView { view! { } @@ -261,7 +261,7 @@ Isn’t there some way to skip levels? There is! -### The Context API +### 4.1 The Context API You can provide data that skips levels by using [`provide_context`](https://docs.rs/leptos/latest/leptos/fn.provide_context.html) and [`use_context`](https://docs.rs/leptos/latest/leptos/fn.use_context.html). Contexts are identified @@ -284,6 +284,7 @@ pub fn App() -> impl IntoView { } // and omitted +// To work in this version, drop their references to set_toggled #[component] pub fn ButtonD() -> impl IntoView {