docs: refresh outdated bindActionCreators example#311
Conversation
There was a problem hiding this comment.
Code Review
This pull request simplifies the Redux connect documentation in README.md and README_SOURCE.md by replacing the manual mapDispatchToProps function with the more idiomatic object shorthand for action creators. This change aligns the examples with modern react-redux usage and leverages automatic type inference. The review feedback identifies and provides suggestions to fix several grammatical issues in the accompanying comments to improve clarity.
| // Notice we don't need to pass any generic type parameters to neither | ||
| // the connect function below nor map functions declared above | ||
| // because type inference will infer types from arguments annotations automatically | ||
| // This is much cleaner and idiomatic approach |
There was a problem hiding this comment.
The comments in this section contain a few grammatical issues: a double negative ('don't ... neither'), a plural/singular mismatch ('arguments annotations'), and a missing article ('a much cleaner...'). Improving these will enhance the clarity of the documentation.
| // Notice we don't need to pass any generic type parameters to neither | |
| // the connect function below nor map functions declared above | |
| // because type inference will infer types from arguments annotations automatically | |
| // This is much cleaner and idiomatic approach | |
| // Notice we don't need to pass any generic type parameters to either | |
| // the connect function below or map functions declared above | |
| // because type inference will infer types from argument annotations automatically | |
| // This is a much cleaner and more idiomatic approach |
| // Notice we don't need to pass any generic type parameters to neither | ||
| // the connect function below nor map functions declared above | ||
| // because type inference will infer types from arguments annotations automatically | ||
| // This is much cleaner and idiomatic approach |
There was a problem hiding this comment.
The comments in this section contain a few grammatical issues: a double negative ('don't ... neither'), a plural/singular mismatch ('arguments annotations'), and a missing article ('a much cleaner...'). Improving these will enhance the clarity of the documentation.
| // Notice we don't need to pass any generic type parameters to neither | |
| // the connect function below nor map functions declared above | |
| // because type inference will infer types from arguments annotations automatically | |
| // This is much cleaner and idiomatic approach | |
| // Notice we don't need to pass any generic type parameters to either | |
| // the connect function below or map functions declared above | |
| // because type inference will infer types from argument annotations automatically | |
| // This is a much cleaner and more idiomatic approach |
|
Addressed the wording review in efd54ab. I rewrote the nearby connect-example comments for grammar and clarity in both |
Summary
bindActionCreatorsexample with the object shorthand that currentreact-reduxusage already supportsREADME.mdfromREADME_SOURCE.mdValidation
npm run ci-checkCloses #203