{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/react-dnd/issues/368","repository_url":"https://api.github.com/repos/gaearon/react-dnd","labels_url":"https://api.github.com/repos/gaearon/react-dnd/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/react-dnd/issues/368/comments","events_url":"https://api.github.com/repos/gaearon/react-dnd/issues/368/events","html_url":"https://github.com/gaearon/react-dnd/issues/368","id":130608242,"number":368,"title":"DragSource with \"Stateless functional components\" fails without error or warning","user":{"login":"jackielii","id":360983,"avatar_url":"https://avatars.githubusercontent.com/u/360983?v=3","gravatar_id":"","url":"https://api.github.com/users/jackielii","html_url":"https://github.com/jackielii","followers_url":"https://api.github.com/users/jackielii/followers","following_url":"https://api.github.com/users/jackielii/following{/other_user}","gists_url":"https://api.github.com/users/jackielii/gists{/gist_id}","starred_url":"https://api.github.com/users/jackielii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackielii/subscriptions","organizations_url":"https://api.github.com/users/jackielii/orgs","repos_url":"https://api.github.com/users/jackielii/repos","events_url":"https://api.github.com/users/jackielii/events{/privacy}","received_events_url":"https://api.github.com/users/jackielii/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-02T08:11:49Z","updated_at":"2016-02-14T00:57:54Z","closed_at":"2016-02-14T00:57:54Z","body":"I'm not sure if this is expected behaviour. If so, some documentation is due?\r\n\r\nReproduce PR: #369 "},"comment":{"url":"https://api.github.com/repos/gaearon/react-dnd/issues/comments/183782133","html_url":"https://github.com/gaearon/react-dnd/issues/368#issuecomment-183782133","issue_url":"https://api.github.com/repos/gaearon/react-dnd/issues/368","id":183782133,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T00:57:54Z","updated_at":"2016-02-14T00:57:54Z","body":"I don’t have the time to look into your PR in detail but functional components work fine on my end.\r\nFor example, I can replace\r\n\r\n```js\r\n@DragSource(ItemTypes.BOX, boxSource, (connect, monitor) => ({\r\n  connectDragSource: connect.dragSource(),\r\n  isDragging: monitor.isDragging()\r\n}))\r\nexport default class Box extends Component {\r\n  static propTypes = {\r\n    connectDragSource: PropTypes.func.isRequired,\r\n    isDragging: PropTypes.bool.isRequired,\r\n    name: PropTypes.string.isRequired\r\n  };\r\n\r\n  render() {\r\n    const { isDragging, connectDragSource } = this.props;\r\n    const { name } = this.props;\r\n    const opacity = isDragging ? 0.4 : 1;\r\n\r\n    return (\r\n      connectDragSource(\r\n        <div style={{ ...style, opacity }}>\r\n          {name}\r\n        </div>\r\n      )\r\n    );\r\n  }\r\n}\r\n```\r\n\r\nwith\r\n\r\n```js\r\nfunction Box({ connectDragSource, isDragging, name }) {\r\n  const opacity = isDragging ? 0.4 : 1;\r\n\r\n  return (\r\n    connectDragSource(\r\n      <div style={{ ...style, opacity }}>\r\n        {name}\r\n      </div>\r\n    )\r\n  );\r\n}\r\n\r\nexport default DragSource(ItemTypes.BOX, boxSource, (connect, monitor) => ({\r\n  connectDragSource: connect.dragSource(),\r\n  isDragging: monitor.isDragging()\r\n}))(Box);\r\n```\r\n\r\nin `01 Dustbin/Single Target/Box.js`, and it works fine."}}