-
Notifications
You must be signed in to change notification settings - Fork 0
hubs
James edited this page Apr 5, 2017
·
1 revision
- you can add your own hubs that are connected to lifecycle events (similar to React.Component)
- see the available events
class ExampleHub extends Hub {
constructor(parent) {
super(parent)
this.cool = true
}
// this is the most commonly used method
init() {}
// on presets only
// decorate() {}
preConfigs(workflow) { }
preCreates(workflow) { }
postConfigs(workflow) { }
postCreates(workflow) { }
preInit(workflow) { }
postInit(workflow) { }
onCreate(workflow) { }
onConfig(workflow) { }
preConfig(workflow) { }
postConfig(workflow) { }
coreCreate(workflow) { }
coreConfig(workflow) { }
coreInit(workflow) { }
coreSetup(workflow) { }
// #### todo (add back `.when` for whether to use the `hub` or not)
// when: (context, workflow)
// whenCore: (core, workflow)
}