clauderic / clauderic/react-sortable-hoc

Make it easier to use

Open
#760 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

You can use the lib much easier if you would include this:

```typescript
import {SortableContainer, SortableElement, SortableHandle} from "react-sortable-hoc";

const component = ({children}: {children: JSX.Element}) => children;

export const SortableItem = SortableElement(component);
export const SortableList = SortableContainer(component);
export const SortHandle = SortableHandle(component);
```

Usage:

```tsx


    {this.state.elementForList.map((c, i) =>

  • {c}



)}

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.