menu

Statecharts

Statecharts are a precise, visual way of modeling the behaviour of complex reactive systems. They describe how things work, and can help you get your code doing exactly what you want.

Channels
Team

Condition states

February 23, 2019 at 8:17pm

A concerned citizen opened an issue to notify me that the term "junction state" was missing from the glossary. And just this week I got around to writing some words about junctions, or condition states.

Give it a read, and let me know what you think. I added a larger "usage" section than normal, because I think that's one value that the glossary could add; how to apply the various Statechart mechanisms in your day-to-day modeling.

https://statecharts.github.io/glossary/condition-state.html


February 23, 2019 at 8:20pm

Great article! Great explanation with interesting images.

like-fill
1
  • reply
  • like

Very interesting, thank you. I found the "usage" section very clear and helpful. I just got a little surprised by the names of the arguments to the guard functions in the XState section (e, xs). It might be clearer to use the same names as used in the documentation (ctx, event). Or do e and xs refer to something explained elsewhere on the site? Just my two cents.

like-fill
1
  • reply
  • like

Clear & straight to the point. Nice work!

like-fill
1
  • reply
  • like

@esrch, I must have mixed up the order of the arguments. xs refers to the old term for the context, namely "extended state".

Edited
  • reply
  • like

February 24, 2019 at 8:46am

Thanks for the help @esrch. I just updated the names of the parameters to ctx, event.

  • reply
  • like

February 24, 2019 at 10:37pm

Great :-)

  • reply
  • like

February 25, 2019 at 8:00pm

Great explanation, I already used it in a project without noticing ^^ . Good article for going deeper and learn more about it, thanks @mogsie.

like-fill
1
  • reply
  • like