Is there any way to pass machine options such as "guards" and "delays" to a spawned machine either through the "spawn" function on the parent machine or the "useActor" hook on the context property?
Asked
Active
Viewed 81 times
1 Answers
1
After a while, I find out about the "withConfig" method on the machine. You can use it like this.
assign({
machine: () => spawn(someMachine.withConfig({
guards: {
//...
},
})),
})

DiniMad
- 49
- 1
- 9