🎨 Convierte el ciclo de renderizado en async
`prepare()` de `Component`, `render()` de `Region` y `Template`, y la implementación de `ComponentRender` pasan a ser funciones async. Se actualizan todos los componentes base, helpers, tests y ejemplos.
This commit is contained in:
parent
9acd8cc51a
commit
9354894b3a
48 changed files with 436 additions and 365 deletions
|
|
@ -14,6 +14,7 @@ pub struct PoweredBy {
|
|||
copyright: Option<String>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Component for PoweredBy {
|
||||
/// Crea una nueva instancia de `PoweredBy`.
|
||||
///
|
||||
|
|
@ -25,7 +26,7 @@ impl Component for PoweredBy {
|
|||
PoweredBy { copyright: Some(c) }
|
||||
}
|
||||
|
||||
fn prepare(&self, cx: &mut Context) -> Result<Markup, ComponentError> {
|
||||
async fn prepare(&self, cx: &mut Context) -> Result<Markup, ComponentError> {
|
||||
Ok(html! {
|
||||
div id=[self.id()] class="poweredby" {
|
||||
@if let Some(c) = self.copyright() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue