Last active
December 19, 2016 18:04
-
-
Save arackaf/d87b7161279e27dddaff3b7ea6986af0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {DragSource, DragDropContext, DropTarget, DragLayer} from 'react-dnd'; | |
@connect((state, ownProps) => { | |
let subjectsModule = state.subjectsModule, | |
//... | |
return { | |
//........ | |
} | |
}, {...actionCreators}) | |
@DragSource('subject', { | |
beginDrag: props => { | |
props.beginDrag(props.subject._id); | |
return props.subject; | |
}, | |
endDrag: props => { | |
props.clearSubjectDragging(); | |
} | |
}, (connect, monitor) => ({ | |
connectDragSource: connect.dragSource(), | |
connectDragPreview: connect.dragPreview() | |
})) | |
class SubjectDisplayContent extends Component { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment