Skip to content

Update API docs for v5 #480

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

Merged
merged 4 commits into from
Oct 5, 2016
Merged

Update API docs for v5 #480

merged 4 commits into from
Oct 5, 2016

Conversation

jimbolla
Copy link
Contributor

This can certainly be better, but it's not a bad start.

let result = {}
const actions = bindActionCreators(actionCreators, dispatch)
const addTodo = (text) => actions.addTodo(ownProps.userId, text)
const memoize = initShallowMemoizer()
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, not sure to have seen this memoizer used in this example

Copy link
Contributor Author

@jimbolla jimbolla Sep 5, 2016

Choose a reason for hiding this comment

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

Whoops. That's dead code I think.

@timdorr
Copy link
Member

timdorr commented Oct 5, 2016

OK, let's merge this in for now.

@timdorr timdorr merged commit 9fccae5 into reduxjs:next Oct 5, 2016
@jimbolla jimbolla deleted the update-docs-for-v5 branch October 5, 2016 14:18
aikoven pushed a commit to aikoven/react-redux that referenced this pull request Nov 21, 2016
* updates docs for changes in v5 (WORK IN PROGRESS)

* update docs for changes in v5

* removes unused code from example

* adds a tags to api.md for direct linking
neeharv pushed a commit to neeharv/react-redux that referenced this pull request Feb 18, 2017
* updates docs for changes in v5 (WORK IN PROGRESS)

* update docs for changes in v5

* removes unused code from example

* adds a tags to api.md for direct linking
@mondaychen
Copy link

mondaychen commented Mar 20, 2017

Hi.

I was reading https://github.com/reactjs/react-redux/blob/master/docs/api.md#examples-1 and this PR contains the latest commit changing that part.

I guess you have a plan to update the example for connectAdvanced, but it was not done yet. That's why it now confuses me.

  • It seems that nextProps should be nextOwnProps. Correct? Otherwise it would be an undefined variable.
  • What's the use of state? It keeps track of the newest state, but is not used to compute anything in the scope.
  • addTodo is defined when ownProps.userId is undefined and never gets updated. Should it be moved into the selector function and use nextProps.userId instead?

albertodev7 pushed a commit to albertodev7/react-redux that referenced this pull request Dec 8, 2022
* updates docs for changes in v5 (WORK IN PROGRESS)

* update docs for changes in v5

* removes unused code from example

* adds a tags to api.md for direct linking
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.

4 participants