Skip to content

xstate@6.0.0-beta.1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 06 Nov 15:24
· 1 commit to next since this release
d84d1de

Patch Changes

  • 599ec3c: Unknown transition targets are now type errors in setup().createMachine(...), not only in createMachine(...). Targets returned from transition functions are also checked:

    setup({}).createMachine({
      initial: 'a',
      states: {
        a: {
          on: {
            // Type error: 'bb' is not a state
            GO: () => ({ target: 'bb' })
          }
        },
        b: {}
      }
    });

    Dynamic (non-literal) string targets are still accepted.