mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
docs: minor fixes for some code examples in the book (#2077)
This commit is contained in:
parent
75c27e0b85
commit
9c44da2594
2 changed files with 4 additions and 4 deletions
|
@ -135,17 +135,17 @@ pub fn App() -> impl IntoView {
|
|||
}
|
||||
|
||||
#[component]
|
||||
pub fn Outer(ChildrenFn) -> impl IntoView {
|
||||
pub fn Outer(children: ChildrenFn) -> impl IntoView {
|
||||
children()
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn Inner(ChildrenFn) -> impl IntoView {
|
||||
pub fn Inner(children: ChildrenFn) -> impl IntoView {
|
||||
children()
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn Inmost(ng) -> impl IntoView {
|
||||
pub fn Inmost(name: String) -> impl IntoView {
|
||||
view! {
|
||||
<p>{name}</p>
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ pub struct Todos(Vec<Todo>);
|
|||
|
||||
impl Todos {
|
||||
pub fn num_remaining(&self) -> usize {
|
||||
todos.iter().filter(|todo| !todo.completed).sum()
|
||||
self.0.iter().filter(|todo| !todo.completed).sum()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue