import React , { ReactElement } from "react" ; import { Draggable , DraggableProvided , DraggableStateSnapshot } from "react-beautiful-dnd" ; import hash from "object-hash" ; export interface ListManagerItemProps { item : any ; index : number ; render ( item ) : ReactElement < { } > ; } export const ListManagerItem = ( { item , index , render } ) => ( < Draggable draggableId = { hash ( item ) } index = { index } > { ( provided , _ ) => ( < div ref = { provided . innerRef } { ... provided . draggableProps } { ... provided . dragHandleProps } > { render ( item ) } < /div>)} < /Draggable>);