🚧 [context] Generaliza los parámetros de contexto

This commit is contained in:
Manuel Cillero 2025-09-06 09:41:01 +02:00
parent 8274519405
commit 3bf058b8a5
4 changed files with 168 additions and 38 deletions

View file

@ -25,7 +25,7 @@ use crate::prelude::*;
/// use pagetop::prelude::*;
///
/// let component = Html::with(|cx| {
/// let user = cx.get_param::<String>("username").unwrap_or(String::from("visitor"));
/// let user = cx.param::<String>("username").cloned().unwrap_or(String::from("visitor"));
/// html! {
/// h1 { "Hello, " (user) }
/// }