Xstate: Action for onExit not triggered when transition out on higher level

Created on 17 Sep 2018  路  3Comments  路  Source: davidkpiano/xstate

Bug or feature request?

Bug

Description:

The onExit action in a nested, parallel state is not triggered when transitioning out on a higher level

(Bug) Expected result:

onEntry and onExit actions should be triggered

(Bug) Actual result:

onExit action is not triggered, onEntry is though.

Link to reproduction or proof-of-concept:

https://repl.it/@rodin/xstate-example

It logs D2 entry, but not D2 exit, which I think it should?

bug

Most helpful comment

Fixed in 05a19b8c4c20f4051fee67022a2f67a5d5de5861 (and available in xstate@next)

All 3 comments

You're right, it should. I'm working on a major refactor that will address this (and also simplify the algorithms).

Thanks, that's all I needed to know.

Fixed in 05a19b8c4c20f4051fee67022a2f67a5d5de5861 (and available in xstate@next)

Was this page helpful?
0 / 5 - 0 ratings