Life cycleexperiment

WARNING

Currently, the complete life cycle has not been fully implemented. It is an experimental function. Open #[before_create]

#[before_create]

Called immediately after the component instance is initialized. Use the #[before_create] annotation on a method or closure.

Usage

Fn

1#[before_create]
2fn before_create(){
3    println!("before create!");
4}

Closure

1#[before_create]
2let mut before_create = || {
3    println!("before create!");
4};

#[created]

Options called after instance initialization is complete

#[before_update]

Called before instance update

#[updated]

Called after instance update