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

reactor.dispatch throwing error 'VM31785:6061 Uncaught Error: dispatch cannot be called with an undefined action type.' #226

Open
jani937 opened this issue Nov 18, 2016 · 1 comment

Comments

@jani937
Copy link

jani937 commented Nov 18, 2016

Following below https://optimizely.github.io/nuclear-js/docs/01-getting-started.html to see shopping cart example from nuclearjs demo.

  1. Create reactor.js as per above url and completed all the documentation.
  2. After building & running app, below is the error i have experiencing with at 'reactor.dispatch(RECEIVE_PRODUCTS, { products })' line of code in actions.js file.
    VM31785:6061 Uncaught Error: dispatch cannot be called with an undefined action type.

Anyone has any suggestions?

@raulmatei
Copy link
Contributor

It looks like RECEIVE_PRODUCTS is undefined. Do you have an action types file? How do you export/import action types in the actions file (assuming that you use dispatch inside actions).

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

No branches or pull requests

2 participants