github statelyai/xstate xstate@6.0.0-beta.1

pre-release2 hours ago

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.

Don't miss a new xstate release

NewReleases is sending notifications on new releases.