Pass the event into the initial context
matthewp opened this issue · comments
Matthew Phillips commented
This is particularly useful for child machines. Prevents the need for an initial state to handle receiving the event.
const child = createMachine({
one: state()
}, (ctx, ev) => ( { files: ev.files }));
Matthew Phillips commented
This was added.