[−][src]Trait yewtil::Emissive
Derivable trait used to simplify calling callbacks in pure components.
This trait is responsible for automating calling emit on a callback passed via props within types
that implement PureComponent
.
Note
When deriving, the derive macro will attempt to locate a field with a Callback<_>
.
type and use the inner type of the callback to specify the Message
type of Emissive
.
The derived emit
function will call self.<name of the callback struct>.emit(msg)
.
If it cannot find a callback struct, the Message
type will be set to ()
and emit
will do nothing.