Xstate: Targetless transition on parent state changes state

Created on 2 Sep 2019  路  5Comments  路  Source: davidkpiano/xstate

To reproduce

  1. https://xstate.js.org/viz/?gist=887f4c842224a6d1ff0a253548d68b47
  2. Click NEXT to move to state bbb
  3. Click TEST

(Bug) Expected result:

Machine stays in state bbb

(Bug) Actual result:

Machine transitions to state aaa

Use case

I'd like to have top-level actions that modify context without changing the current state.

Most helpful comment

I can confirm that this seems broken in XState 4.6, but seems to be fixed i 4.7 (currently at RC stage) - https://codesandbox.io/s/wizardly-lamarr-eo00y

All 5 comments

I can confirm that this seems broken in XState 4.6, but seems to be fixed i 4.7 (currently at RC stage) - https://codesandbox.io/s/wizardly-lamarr-eo00y

Updated some older code from XState 4.4 to 4.6 today and got burned by this one, too.

This looks an awful lot like #507 (which was fixed in #545 but hasn't been released yet).

Try it out with xstate@next please 馃檹 This issue should be resolved.

Closing as this is resolved in xstate@next

Was this page helpful?
0 / 5 - 0 ratings

Related issues

greggman picture greggman  路  3Comments

rodinhart picture rodinhart  路  3Comments

hnordt picture hnordt  路  3Comments

3plusalpha picture 3plusalpha  路  3Comments

carlbarrdahl picture carlbarrdahl  路  3Comments