Skip to content

Will strict mode really be removed? & Implications and use cases #4124

Discussion options

You must be logged in to vote

The mode itself is removed in v5, but you can be explicit about its same behavior by using a root wildcard transition, which actually lets you be more flexible with strictness:

const machine = createMachine({
  // ...
  on: {
    '*': {
      actions: () => { throw new Error(...) }
    }
  }
});

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by mellanslag-de
Comment options

You must be logged in to vote
2 replies
@dr-skot
Comment options

@davidkpiano
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants