Skip to content
New issue

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

Cannot use send actions creator #81

Closed
raitucarp opened this issue Apr 24, 2021 · 1 comment
Closed

Cannot use send actions creator #81

raitucarp opened this issue Apr 24, 2021 · 1 comment

Comments

@raitucarp
Copy link

raitucarp commented Apr 24, 2021

this code below throw an error, when I implement send actions creator:

const sendName = send((context, event) => ({
  type: 'NAME',
  name: context.user.name
}));

...
actions: [
  assign({
    data: (context, event) => ({
      ...context.data,
      name: event.target.value,
    }),
  }),
  sendName ,
],
....

Error:

TypeError: Cannot read property 'indexOf' of undefined
react-dom.production.min.js:4408 TypeError: Cannot read property 'indexOf' of undefined
    at sn (StateChartAction.js:86)
    at Qi (react-dom.production.min.js:3274)
    at ka (react-dom.production.min.js:3899)
    at Vo (react-dom.production.min.js:5514)
    at zo (react-dom.production.min.js:5536)
    at Ns (react-dom.production.min.js:5958)
    at ws (react-dom.production.min.js:5925)
    at Ms (react-dom.production.min.js:6020)
    at Rn (react-dom.production.min.js:1737)
@davidkpiano
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants