Skip to content

"raise" isn't supported within entry actions #4326

Answered by davidkpiano
Bab64 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, you're close! raise(...) is an action creator; it doesn't imperatively execute the action.

So instead, the entry action should look like:

// creates an action object like { type: 'xstate.raise', event: { type: 'e2 } }
entry: raise({ type: 'e2' })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Bab64
Comment options

Answer selected by Bab64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants