Drag and Drop supported dynamic scrollview for react-native. Inspired by react-native-draggable-dynamic-flatlist.
$ npm install react-native-drag-and-drop-scroll-view --save
$ react-native link react-native-drag-and-drop-scroll-view
import {TouchableOpacity} from 'react-native';
import DragAndDropScrollView from 'react-native-drag-and-drop-scroll-view';
const Screen = (props) => {
const _onSortOrderUpdate = (data) => {
}
const _renderRow = ({move, moveEnd, item}) => {
return (
<TouchableOpacity
onLongPress={move}
onPressOut={moveEnd}>
..........
</TouchableOpacity>
)
}
return (
<DragAndDropScrollView
data={['1', '2']}
renderItem={_renderRow}
onSortOrderUpdate={_onSortOrderUpdate}/>
);
}