setTimeout(() => { if (this.service.state.matches("saving")) { this.setState({ item: { ...this.state.item, ...payload.data } }); } this.service.send("complete"); resolve(); }, 3000);
transition(previousState, event) { const currentState = this.service.send(event); console.log({ previousState, currentState, event }); return currentState; }