react-dnd / react-dnd-html5-backend

HTML5 backend for React DnD [Legacy Repo]
MIT License
145 stars 97 forks source link

connectDragSource can specify custom dataTransfer data #60

Open bspaulding opened 7 years ago

bspaulding commented 7 years ago

I've got a use case with a codebase in transition, where ideally I'd like to interop with the existing code. Are you opposed to something like this? Shouldn't change any behavior that I can see.

This let's a react-dnd user do:

connectDragSource(
  <div>MyDraggable</div>,
  { 
    dataTransferData: {
      some: 'extra-stuff-another-lib-will-use'
    }
  }
)