Skip to content

docs: replace slice calls to map #1477

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 1 commit into from
Mar 4, 2016
Merged

docs: replace slice calls to map #1477

merged 1 commit into from
Mar 4, 2016

Conversation

just-boris
Copy link
Contributor

As it was discussed in #1468, ES5 array methods like map and filter are recommended approach rather than array slicing.

@mxstbr
Copy link
Contributor

mxstbr commented Mar 4, 2016

IMO this looks much cleaner and easier to understand, thanks very much @just-boris!

I'm in a hurry right now, so I'll do a functional test soon to make sure everything still works as expected and then merge!

@mxstbr mxstbr added the docs label Mar 4, 2016
@just-boris
Copy link
Contributor Author

I made changes only in Markdown files. So all code there wasn't actually executed during build.

@mxstbr How are gooing to test this?

@mxstbr
Copy link
Contributor

mxstbr commented Mar 4, 2016

Oh right, my bad, I didn't look at the code changes!

Looked through it now, LGTM, thanks very much @just-boris!

mxstbr added a commit that referenced this pull request Mar 4, 2016
docs: replace slice calls to map
@mxstbr mxstbr merged commit d2d0824 into reduxjs:master Mar 4, 2016
...state.slice(action.index + 1)
]
return state.map((todo, index) => {
if(index === action.index) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we leave space after if pretty much everywhere else.
Would you mind fixing this as a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem, attached it to #1478

gaearon added a commit that referenced this pull request Mar 4, 2016
docs: fix surrounding text after changes in #1477
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants