Skip to content

Conversation

@raunofreiberg
Copy link
Contributor

@raunofreiberg raunofreiberg commented Feb 21, 2018

Some code clean-up for easier understanding and better conventions (i.e no temporary variable for connecting a component to the store).

@raunofreiberg raunofreiberg changed the title refactor: improve the general style of the approach to React [todos] [refactor] improve the general style of the approach to React Feb 21, 2018
{filter.label}
</FilterLink>
))}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

I know this is pedantic, but can we leave this alone? I'd rather make the UI and code 1:1, than essentially be doing meta-programming of the UI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was wondering about this as well. Amended my last commit, should be restored now.

@timdorr
Copy link
Member

timdorr commented Feb 21, 2018

BTW, any code changes here need to be reflected here: https://github.com/reactjs/redux/blob/master/docs/basics/ExampleTodoList.md

@raunofreiberg
Copy link
Contributor Author

raunofreiberg commented Feb 21, 2018

Seems like the ExampleTodoList.md hasn't been updated for a while. Went ahead and updated the whole readme since the docs were outdated a bit and still used the old style as opposed to the actual code.

@raunofreiberg raunofreiberg force-pushed the master branch 7 times, most recently from a589d68 to 51af07b Compare February 21, 2018 21:23
SHOW_ACTIVE: 'SHOW_ACTIVE'
SHOW_ALL: 'SHOW_ALL',
SHOW_COMPLETED: 'SHOW_COMPLETED',
SHOW_ACTIVE: 'SHOW_ACTIVE'
Copy link
Member

Choose a reason for hiding this comment

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

This should still be two spaces. Are you running Prettier locally? We've added it to the library code, but not the examples yet. It may be a good idea to introduce it now, since this is already a pretty notable refactor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm. Not sure how that happened, I'm not using Prettier locally either. Maybe consider creating a issue about it separately and it might get taken up in another pull request. Fixed it for now.

Copy link
Member

@timdorr timdorr left a comment

Choose a reason for hiding this comment

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

👍

@raunofreiberg
Copy link
Contributor Author

raunofreiberg commented Feb 22, 2018

@timdorr This should be ready for merging now.

@timdorr
Copy link
Member

timdorr commented Feb 22, 2018

It's got the 👍 from me, but since this is rather large and very visible code, I'd like a second set of eyes on it before merging.

@CodeKommissar
Copy link

Hi @timdorr! About the coding style, I think the changes made by @raunofreiberg are for the better. It uses const declarations instead of let, has better naming conventions and the arrow functions implicitly return objects. The refactoring (in my opinion) does improves readability.

@timdorr
Copy link
Member

timdorr commented Mar 13, 2018

OK, I think we're good on this. Thanks!

@timdorr timdorr merged commit 49e4883 into reduxjs:master Mar 13, 2018
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.

3 participants