Skip to content

docs: refresh outdated bindActionCreators example#311

Open
narutamaaurum wants to merge 2 commits into
piotrwitek:masterfrom
narutamaaurum:fix-203-bindactioncreators-docs
Open

docs: refresh outdated bindActionCreators example#311
narutamaaurum wants to merge 2 commits into
piotrwitek:masterfrom
narutamaaurum:fix-203-bindactioncreators-docs

Conversation

@narutamaaurum

Copy link
Copy Markdown

Summary

  • replace the outdated basic bindActionCreators example with the object shorthand that current react-redux usage already supports
  • remove the stale generic-validation snippet that no longer reflects the guide's current recommendations
  • regenerate README.md from README_SOURCE.md

Validation

  • npm run ci-check

Closes #203

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md Outdated
Comment on lines 1797 to 1800
// 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
// 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

Comment thread README_SOURCE.md Outdated
Comment on lines 691 to 694
// 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
// 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

@narutamaaurum

narutamaaurum commented May 23, 2026

Copy link
Copy Markdown
Author

Addressed the wording review in efd54ab. I rewrote the nearby connect-example comments for grammar and clarity in both README_SOURCE.md and regenerated README.md, then reran npm run ci-check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bindActionCreators example is outdated

1 participant