Xstate: Sending event `send()` after interpreter is stopped causes actions to be executed.

Created on 14 Oct 2019  路  6Comments  路  Source: davidkpiano/xstate

Description
Sending event send() after interpreter is stopped causes actions to be executed.

Expected Result
After interpreter is stopped, sending event should not execute any action.

Actual Result
After interpreter is stopped, sending event executes entry action.

Reproduction
https://codesandbox.io/s/xstate-example-template-pubkk

Additional context
Maybe I am wrong and don't get something with start/stop/send functions.

bug

All 6 comments

@davidkpiano so it isn't bug, and this behavior is valid in this configuration, while it is working correctly in other configuration?

@Baael It is a bug, that I just fixed.

I didn't noticed, you are too fast :D Good, cause client wasn't sure if use of this library is good idea. Now I have proof.

Good, cause client wasn't sure if use of this library is good idea.

Any other concerns? 馃槃

No, I have very strong argument now :)

Keep in mind as well that most of the issues in this repo are discussions and/or questions, not bugs. And most of the bugs are small SCXML compatibility issues and edge-cases, not issues that you will run to in normal projects.

This also follows SCXML (an XState-SCXML converter will be released this year) so everything follows the spec, and nothing will be invented (no feature/scope creep) in this project, if that helps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doup picture doup  路  3Comments

suku-h picture suku-h  路  3Comments

hnordt picture hnordt  路  3Comments

ifokeev picture ifokeev  路  3Comments

bradwoods picture bradwoods  路  3Comments