{"action":"created","issue":{"url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/36","repository_url":"https://api.github.com/repos/dogfessional/react-swipeable","labels_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/36/comments","events_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/36/events","html_url":"https://github.com/dogfessional/react-swipeable/pull/36","id":151428060,"number":36,"title":"Merge props into child element instead of wrapping children into a new div tag","user":{"login":"Xazzzi","id":1200201,"avatar_url":"https://avatars.githubusercontent.com/u/1200201?v=3","gravatar_id":"","url":"https://api.github.com/users/Xazzzi","html_url":"https://github.com/Xazzzi","followers_url":"https://api.github.com/users/Xazzzi/followers","following_url":"https://api.github.com/users/Xazzzi/following{/other_user}","gists_url":"https://api.github.com/users/Xazzzi/gists{/gist_id}","starred_url":"https://api.github.com/users/Xazzzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xazzzi/subscriptions","organizations_url":"https://api.github.com/users/Xazzzi/orgs","repos_url":"https://api.github.com/users/Xazzzi/repos","events_url":"https://api.github.com/users/Xazzzi/events{/privacy}","received_events_url":"https://api.github.com/users/Xazzzi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-27T16:21:00Z","updated_at":"2016-05-04T20:30:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dogfessional/react-swipeable/pulls/36","html_url":"https://github.com/dogfessional/react-swipeable/pull/36","diff_url":"https://github.com/dogfessional/react-swipeable/pull/36.diff","patch_url":"https://github.com/dogfessional/react-swipeable/pull/36.patch"},"body":"I did it for myself, because additional divs were breaking my flexbox layout, but it turns out there are people who are also unhappy with default behaviour (like #24).\r\n\r\nI'm doing pull request to show the idea of how could it be done, but it shouldn't actually be merged, because of compatibility issues people will have.\r\n\r\nI'm using `<Swipeable>` as a higher-order component, wrapping individual react elements so i didn't bother with handling cases like multiple children or non-element content.\r\n\r\nHowever, there's nothing limiting from introducing HOC-feature **with** backward compatibility.\r\nHope it will be implemented in some future release =)"},"comment":{"url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/comments/216993287","html_url":"https://github.com/dogfessional/react-swipeable/pull/36#issuecomment-216993287","issue_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/36","id":216993287,"user":{"login":"hartzis","id":5378707,"avatar_url":"https://avatars.githubusercontent.com/u/5378707?v=3","gravatar_id":"","url":"https://api.github.com/users/hartzis","html_url":"https://github.com/hartzis","followers_url":"https://api.github.com/users/hartzis/followers","following_url":"https://api.github.com/users/hartzis/following{/other_user}","gists_url":"https://api.github.com/users/hartzis/gists{/gist_id}","starred_url":"https://api.github.com/users/hartzis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hartzis/subscriptions","organizations_url":"https://api.github.com/users/hartzis/orgs","repos_url":"https://api.github.com/users/hartzis/repos","events_url":"https://api.github.com/users/hartzis/events{/privacy}","received_events_url":"https://api.github.com/users/hartzis/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T20:30:20Z","updated_at":"2016-05-04T20:30:20Z","body":"Thanks for the example. I definitely agree that the `Swipeable` container should either be configurable or I'm leaning towards a major version change that applies `Swipeable` to its child, whatever element that may be. And probably throw a warning/error if you supply more than one child.\r\n\r\nI've been looking at how `react-redux` and `recompose` do things like this and other components out there that just add functionality to components/elements."}}