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

HOCs should consume props they use #98

Closed
frontendphil opened this issue Nov 29, 2016 · 3 comments
Closed

HOCs should consume props they use #98

frontendphil opened this issue Nov 29, 2016 · 3 comments

Comments

@frontendphil
Copy link
Contributor

The HOCs should consume the props they use internally and not hand them down to the wrapped components. Currently I need to sort out all internal props so that they do not end up as props on the elements I'm rendering.

@clauderic
Copy link
Owner

Yeah, this has been discussed already in #95 and should be resolved soon. If you feel like getting your hands dirty, all PRs are welcome!

frontendphil added a commit to frontendphil/react-sortable-hoc that referenced this issue Nov 30, 2016
- removed number of instance properties
- removed unused method getHelperDimensions from props and class
clauderic pushed a commit that referenced this issue Dec 5, 2016
#98 do not pass private props to wrapped …
@clauderic
Copy link
Owner

This was addressed in #100, thank you!

@derwaldgeist
Copy link

derwaldgeist commented Sep 21, 2017

Hm, I don't think that consuming the index was a good idea. Knowing the index of the element in the list is important for a lot of use-cases. In my case, each element has a "delete" button, and I have to know which of these delete buttons has been clicked, i.e. which of the items shall be removed. The easiest way to get this information would be knowing their list index.

DimitarNestorov pushed a commit to codemotionapps/react-sortable-hoc that referenced this issue Feb 4, 2019
- removed number of instance properties
- removed unused method getHelperDimensions from props and class
DimitarNestorov pushed a commit to codemotionapps/react-sortable-hoc that referenced this issue Feb 4, 2019
clauderic#98 do not pass private props to wrapped …
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

No branches or pull requests

3 participants