Can we have an alias function that is called createActionCreator()?

Author: christopher-franciscoCreated Jan 17, 2019Updated Aug 21, 2019

Docs says about the createAction function:

NOTE: The more correct name for this function is probably createActionCreator(), but that seems a bit redundant.

In my opinion this is not redundant. This is important. It creates confusion and it takes me extra time to clear out the unnecessary confusion when talking to redux to somebody new to it (Yes, not everybody that join a project has allocated time to just study redux).

The confusion I'm talking about is:

  • an action is an object
  • an action creator is a function

So when they go an see that createAction returns a function, they think that the function is the action and end up wrapping it up in another function, making a mess.

My point is, let's just have an alias (so that it's backward compatible) so that whoever wants can use createActionCreator instead of createAction. Also I'd love not have to hack this into my project.

Source: redux-utilities/redux-actions