Skip to content

Commit 012fac2

Browse files
committed
🔥 Remove before/after_prepare_..() from components
1 parent e5db7ef commit 012fac2

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

pagetop/src/core/component/definition.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,15 @@ pub trait ComponentTrait: ComponentBase + HasHandle + Send + Sync {
3939
true
4040
}
4141

42-
#[allow(unused_variables)]
43-
fn before_prepare_component(&mut self, cx: &mut Context) {}
44-
4542
#[allow(unused_variables)]
4643
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
4744
PrepareMarkup::None
4845
}
49-
50-
#[allow(unused_variables)]
51-
fn after_prepare_component(&mut self, cx: &mut Context) {}
5246
}
5347

5448
impl<C: ComponentTrait> ComponentBase for C {
5549
fn render(&mut self, cx: &mut Context) -> Markup {
5650
if self.is_renderable(cx) {
57-
// Acciones antes de preparar el componente.
58-
self.before_prepare_component(cx);
59-
6051
// Acciones del tema antes de preparar el componente.
6152
cx.theme().before_prepare_component(self, cx);
6253

@@ -76,9 +67,6 @@ impl<C: ComponentTrait> ComponentBase for C {
7667
},
7768
};
7869

79-
// Acciones después de preparar el componente.
80-
self.after_prepare_component(cx);
81-
8270
// Acciones del tema después de preparar el componente.
8371
cx.theme().after_prepare_component(self, cx);
8472

0 commit comments

Comments
 (0)