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
Confusing createAction
#673
Comments
Agreed that the name isn't 100% descriptive, but it's wayyyy too late to change that at this point. Besides, most people won't even call |
No wonder Redux has such attrition at the moment... If one of the main libraries is openly confusing and contributors don't care about that at all |
I'll have to disagree with all of that statement. RTK's usage is rising steadily (ignore the weird blip at the end, NPM's stats had 0 on Thursday and double on Friday): https://npm-stat.com/charts.html?package=%40reduxjs%2Ftoolkit&from=2020-02-01&to=2020-08-02 No one else has raised a complaint about the naming of Also, renaming stuff would require:
All for no real meaningful benefit to the end user, and as I said, it's an API that most users won't even call themselves in practice. I care deeply about our userbase. But, being a maintainer means weighing lots of different concerns: naming, API design, existing users, and much more. As an example, see the multiple 250+ comment issue threads on how we designed the React-Redux hooks API:
I'm not going to publish a breaking change and force our users to rewrite their code, for a name change that I don't even feel is an actual improvement, and that has no further evidence that this is actually a problem for our users. |
Now go to the React repository and suggest they change they rename one of the core APIs. Go to TC39 and request that a JavaScript API is should be renamed. Because there is a more fitting name for it. RTK was in a public pre-release state for over a year. That feedback would have been possbile then. By now, it's in production for almost a year. It has a userbase. Numerous tutorials have been written on it. It's not worth breaking something like that just to "be more precise". Guess what? There's a documentation. |
Hey,
I'd like to point out that for people with little or no former Redux experience, who jump straight into the toolkit, the
createAction
name is confusing. This function does not in fact create any action - it defines an action creator, which in turn is responsible for creating the action. I'd like to propose renamingcreateAction
todefineActionCreator
.The text was updated successfully, but these errors were encountered: