{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/react-dnd/issues/299","labels_url":"https://api.github.com/repos/gaearon/react-dnd/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/react-dnd/issues/299/comments","events_url":"https://api.github.com/repos/gaearon/react-dnd/issues/299/events","html_url":"https://github.com/gaearon/react-dnd/issues/299","id":110567250,"number":299,"title":"Discussion: why not just embed `type` within `item`?","user":{"login":"jedwards1211","id":1448194,"avatar_url":"https://avatars.githubusercontent.com/u/1448194?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards1211","html_url":"https://github.com/jedwards1211","followers_url":"https://api.github.com/users/jedwards1211/followers","following_url":"https://api.github.com/users/jedwards1211/following{/other_user}","gists_url":"https://api.github.com/users/jedwards1211/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards1211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards1211/subscriptions","organizations_url":"https://api.github.com/users/jedwards1211/orgs","repos_url":"https://api.github.com/users/jedwards1211/repos","events_url":"https://api.github.com/users/jedwards1211/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards1211/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-09T00:28:52Z","updated_at":"2015-10-09T12:17:17Z","closed_at":"2015-10-09T04:59:04Z","body":"Since one can use `monitor.getItem` in the the `canDrop` method of `DropTarget`s, `type` seems redundant and inflexible to me.  I haven't seen other frameworks use any kind of `type` key -- they just rely on `canDrop`.  Is it an optimization for speed?  Or to avoid having to write `canDrop` methods for everything?"},"comment":{"url":"https://api.github.com/repos/gaearon/react-dnd/issues/comments/146847913","html_url":"https://github.com/gaearon/react-dnd/issues/299#issuecomment-146847913","issue_url":"https://api.github.com/repos/gaearon/react-dnd/issues/299","id":146847913,"user":{"login":"jedwards1211","id":1448194,"avatar_url":"https://avatars.githubusercontent.com/u/1448194?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards1211","html_url":"https://github.com/jedwards1211","followers_url":"https://api.github.com/users/jedwards1211/followers","following_url":"https://api.github.com/users/jedwards1211/following{/other_user}","gists_url":"https://api.github.com/users/jedwards1211/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards1211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards1211/subscriptions","organizations_url":"https://api.github.com/users/jedwards1211/orgs","repos_url":"https://api.github.com/users/jedwards1211/repos","events_url":"https://api.github.com/users/jedwards1211/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards1211/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T12:17:16Z","updated_at":"2015-10-09T12:17:16Z","body":"I think you could have easily communicated to beginners that `type` is optional but that `canDrop()` is required if `type` is omitted -- then the API would provide an easy pattern for beginners without hindering expert usage, and I assume would make it easier to use host OS DnD events that aren't one of the 3 types built into the HTML5 backend."}}