createEventBus function #

Once you have created your events instance using createEventBus, simply pass it to each component:

import { createComponent, withEventBus } from 'https://cdn.skypack.dev/ficusjs@3'

// A new component
createComponent(
'my-component',
withEventBus(eventBus, {
/* pass component creation options here */
})
)