Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] is it possible to work with this.children in stead of wrapping?

See original GitHub issue

Hi, i’m wondering if you can also use the sortable in the following way in stead of wrapping.

<SortableList onSortEnd={this.handleSort} useDragHandle={true}>
	{ => {
		return (

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

claudericcommented, Feb 14, 2017

Hey @nealoke,

Absolutely! If you’d prefer to use that kind of syntax, you can probably create those yourself by doing something along the lines of:

import {sortableContainer, sortableElement, sortableHandle} form 'react-sortable-hoc';

const wrapper = (props) => <div {children, ...props}>{children}</div>;
const SortableList = sortableContainer(wrapper);
const SortableElement = sortableElement(wrapper);
const SortableHandle = sortableHandle(wrapper);
nealokecommented, Feb 13, 2017

@clauderic Yes this fixed it 👍 Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I wrap the Children of a Parent component in a HOC ...
Here is a working snippet proves that your problem is not related with the HOC. I've used an array of components instead of...
Read more >
Engaging Children in Meaningful Conversation
Ask open-ended questions to challenge children to “go deeper” as they express ideas (e.g., Ask, Why do you think that happened? rather than...
Read more >
React Children And Iteration Methods - Smashing Magazine
The problem with using Children methods to change children behavior is that they only work for one level of nesting of components. If...
Read more >
Child labor: Facts, FAQs, and how to help end it | World Vision
It hurts so much,” says Nuri, whose fingers are wrapped with dirty bandages. Yet she explains, “I cannot stop working for a second....
Read more >
Questions - Dandelion Learning Collaborative
Why Montessori? Montessori learning environments are collaborative, they foster curiosity and cooperation. In this, children are actively engaged in the work of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found