I am trying to wrap multiple functions inside one.
I have a model like this:
const CookModel = types.actions(self =>({
talkToSousChefs:() => {
// talk to sous-chefs
},
talkToWaiters: () => {
// business logic
},
talkToVendors: () => {
// business logic
},
runTalkRoutine: () => {
// current code
const root = getRoot<typeof CookModel>(self)
root.talkToSousChefs()
root.talkToVendors()
root.talkToWaiters()
// what's the best practice?
}
}))
What's the best way to wrap those actions in runTalkRoutine
?