Xstate: Reentering doesn't work with internal transitions

Created on 5 Oct 2019  路  4Comments  路  Source: davidkpiano/xstate

From SCXML:

The behavior of transitions with 'type' of "internal" is identical, except in the case of a transition whose source state is a compound state and whose target(s) is a descendant of the source. In such a case, an internal transition will not exit and re-enter its source state, while an external one will

Repro case:
https://codesandbox.io/s/xenodochial-voice-7rr5b

In this repro case, a1 is the source state for this transition - and for the internal transition it's not reentered (correctly), but according to that fragment of SCXML spec descendants of that source state should be reentered.

Actual:
no reentry actions

Expected:
a11 & a111 being reentered

bug

All 4 comments

If you have time, can you make a failing test case for this?

I plan to look into fixing this when I'm done with my .transition refactor - really hoping to get back to this work this weekend (I certainly won't finish it this weekend though).

@Andarist Is this still valid with the next branch?

No - this was fixed, probably with the implementation of the core algorithm and computing entry/exit states properly in it. I've decided to add simple tests for this though in here: https://github.com/davidkpiano/xstate/pull/1370

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carloslfu picture carloslfu  路  3Comments

pke picture pke  路  3Comments

mattiamanzati picture mattiamanzati  路  3Comments

laurentpierson picture laurentpierson  路  3Comments

kurtmilam picture kurtmilam  路  3Comments