goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 323 forks source link

Descriptive error message when passing a class to generateActions #603

Open msq opened 8 years ago

msq commented 8 years ago

I kept getting the error 'Invalid reference action passed in' or when using bindActions I got ...Actions.default.fetch is not a function

After a while I noticed I used

export default alt.generateActions(Class) instead of createActions(Class)

Maybe a check if object is class and output an error use createActions when passing a class?

Could save someone a lot of time.