We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XState version 5
When calling spawnChild in the actions of an event, the input function does not filter to just the event but rather all events in the schema
const myMachine = setup({ types: {} as { context: TranscriptionsMachineContext events:{ type: 'foo'; value: string } | { type: 'bar' } }, }).createMachine({ on: { foo: { actions: spawnChild('myActor', { input: ({event}) => event.value // HERE }) } } })
event.value should be fine to access
event.value is not accessible as the event could be anything event in the schema, not just foo
foo
https://codesandbox.io/p/devbox/wizardly-solomon-7vskzv?file=%2Fsrc%2FfeedbackMachine.ts%3A46%2C16
No response
The text was updated successfully, but these errors were encountered:
Andarist
No branches or pull requests
XState version
XState version 5
Description
When calling spawnChild in the actions of an event, the input function does not filter to just the event but rather all events in the schema
Expected result
event.value should be fine to access
Actual result
event.value is not accessible as the event could be anything event in the schema, not just
foo
Reproduction
https://codesandbox.io/p/devbox/wizardly-solomon-7vskzv?file=%2Fsrc%2FfeedbackMachine.ts%3A46%2C16
Additional context
No response
The text was updated successfully, but these errors were encountered: