Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (20 sloc) 827 Bytes
extends ../docs-base
block doc
h1 Bus messaging
All data in from components in fig going upwards is meant to flow
through the #[b event bus]. It can be accessed through the
#[b .on], #[b .once], #[b .off] and #[b .emit] methods of the fig
instance, or with the #[b emit] parameter passed to a component.
The methods do what their names' suggest, meant to be used the same as
node's built-in EventEmitter. For detailed usage, see the
#[a(href='/docs/api#todo') API reference].
include ../../examples/bus-messaging
h2 Instance events
Fig emits the following events on all of its instances:
p #[b fig ready] is emitted after the app is mounted and rendered.
p #[b fig update pre] is emitted right before the view is updated.
p #[b fig update] is emitted after the view gets updated.