Skip to content

Commit f2f4d01

Browse files
committed
init components happens after the cycle so children are generated
1 parent 6e3999a commit f2f4d01

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* 0.2.10
2+
* BUGFIX: `on_mount` is now called after the children are generated
13
* 0.2.9
24
* New function: truncate
35
* New border style: "rounded"

anathema-runtime/src/runtime/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ impl<'rt, 'bp, G: GlobalEventHandler> Frame<'rt, 'bp, G> {
385385
puffin::GlobalProfiler::lock().new_frame();
386386

387387
let now = Instant::now();
388-
self.init_new_components();
389388
let elapsed = self.handle_messages(now);
390389
self.poll_events(elapsed, now, backend);
391390
self.drain_deferred_commands();
@@ -399,6 +398,7 @@ impl<'rt, 'bp, G: GlobalEventHandler> Frame<'rt, 'bp, G> {
399398

400399
self.tick_components(self.dt.elapsed());
401400
self.cycle(backend)?;
401+
self.init_new_components();
402402

403403
self.post_cycle_events();
404404

0 commit comments

Comments
 (0)