block state updates while command is in flight
- Lingua principale
- TypeScript
- Stelle
- 8
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Currently the user needs to defend against getting an unrelated state update originating from a network event immediately after invoking a command:
```typescript
let thingDone = false
for await (const state of machine) {
if (state.is(SomeState) && !thingDonw) {
state.cast().commands()?.doTheThing()
thingDone = true
}
}
```
It would be nicer and more intuitive if the next loop iteration was guaranteed to contain the information that was published via the `doTheThing` action (which usually will be reflected in transitioning to a new state, but might also just add something to the current state).
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.