In the app I mention in the post I just assign the error to a context property. The component then accesses it via a computed property and an error message appears when there is a value.
You could also conditionally show the error message depending on the machine's state (success, error, etc.), which is what I did initially. In my case though, the error state was identical to the idle state, just with an error message shown. I didn't see a reason to have an error state then.
I'm still unsure if the approach I took is valid in the world of statecharts but it works!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I guess both approaches are valid.
In the app I mention in the post I just assign the error to a context property. The component then accesses it via a computed property and an error message appears when there is a value.
You could also conditionally show the error message depending on the machine's state (success, error, etc.), which is what I did initially. In my case though, the error state was identical to the idle state, just with an error message shown. I didn't see a reason to have an error state then.
I'm still unsure if the approach I took is valid in the world of statecharts but it works!