Skip to content
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

better solution to redux spread operator #35592

Merged
merged 1 commit into from May 5, 2019
Merged

better solution to redux spread operator #35592

merged 1 commit into from May 5, 2019

Conversation

andrew-ma
Copy link
Contributor

2 step -> 1 step

  • [x ] I have read freeCodeCamp's contribution guidelines.
  • [ x] My pull request has a descriptive title (not a vague title like Update index.md)
  • [ x] My pull request targets the master branch of freeCodeCamp.
  • [ x] None of my changes are plagiarized from another source without proper attribution.
  • [ x] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
  • [ x] My changes do not use shortened URLs or affiliate links.

Closes #XXXXX

@RandellDawson
Copy link
Member

How is it "better"?

@andrew-ma
Copy link
Contributor Author

It's not better but it does saves a step. It also shows how the spread operator can be used for concatenation and not just making a copy of the array. Maybe put both solutions.

@thecodingaviator
Copy link
Contributor

@RandellDawson IMO this might confuse some users who might not be familiar with how the syntax works. Agreed, this was taught in the ES6 part but we should try and keep it simple. Right?

@RandellDawson
Copy link
Member

@thecodingaviator There is an open issue (#35453) regarding what the Guide solutions should look like. I think your points should be discussed there. We have never formally decided if solutions for individual challenges should show methods or concepts which would not have already been taught/learned at the point the challenge is introduced into the curriculum. I believe the whole concept of Intermediate, and Advanced solutions spawned out of the fact that people wanted to post solutions which use ES6 syntax at a time when we were not teaching those methods.

Copy link
Member

@moT01 moT01 left a comment

Choose a reason for hiding this comment

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

I'm thinking this can be merged. The way he shows with this change is sort of suggested in the challenge instructions - I think this is more often how you would see this done with redux - It's taught in ES6 and mentioned again here. And I think it's a better solution.

Thanks for contributing to freeCodeCamp @andrew-ma!

@moT01 moT01 merged commit 586730b into freeCodeCamp:master May 5, 2019
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.

None yet

5 participants