Descriptive error message when passing a class to generateActions
Open
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 312
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Research direction
Start by locating the generateActions and createActions entry points and reproduce the behavior when a class is passed to generateActions. Compare the resulting errors with the requested guidance. Done means the misuse produces a descriptive message directing users to createActions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100