{"action":"created","issue":{"url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/58","repository_url":"https://api.github.com/repos/dogfessional/react-swipeable","labels_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/58/comments","events_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/58/events","html_url":"https://github.com/dogfessional/react-swipeable/pull/58","id":191802448,"number":58,"title":"Not using React state for swipe state","user":{"login":"grantila","id":5362579,"avatar_url":"https://avatars.githubusercontent.com/u/5362579?v=3","gravatar_id":"","url":"https://api.github.com/users/grantila","html_url":"https://github.com/grantila","followers_url":"https://api.github.com/users/grantila/followers","following_url":"https://api.github.com/users/grantila/following{/other_user}","gists_url":"https://api.github.com/users/grantila/gists{/gist_id}","starred_url":"https://api.github.com/users/grantila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grantila/subscriptions","organizations_url":"https://api.github.com/users/grantila/orgs","repos_url":"https://api.github.com/users/grantila/repos","events_url":"https://api.github.com/users/grantila/events{/privacy}","received_events_url":"https://api.github.com/users/grantila/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-26T11:56:44Z","updated_at":"2016-11-27T03:41:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dogfessional/react-swipeable/pulls/58","html_url":"https://github.com/dogfessional/react-swipeable/pull/58","diff_url":"https://github.com/dogfessional/react-swipeable/pull/58.diff","patch_url":"https://github.com/dogfessional/react-swipeable/pull/58.patch"},"body":"The state used for `x`, `y`, `swiping` and `start` aren't used in the render methods (nothing is supposed to happen really, as it's up to the user of `react-swipeable` to perform any x/y-translations), and using setState() will trigger React logic to perform things which may cause stuttering and slow down transitions, etc.\r\n\r\nThis PR will save the state in a local variable `this.swipable` instead of the React state, to ensure we bypass all React state logic, since it's not needed."},"comment":{"url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/comments/263100452","html_url":"https://github.com/dogfessional/react-swipeable/pull/58#issuecomment-263100452","issue_url":"https://api.github.com/repos/dogfessional/react-swipeable/issues/58","id":263100452,"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-11-27T03:41:47Z","updated_at":"2016-11-27T03:41:47Z","body":"mind blown... how have we not noticed this before. you're absolutely correct. Everything wrapped by `<Swipeable>` is possibly being unnecessarily re-rendered a lot.\r\n\r\nI have slight reservations as a recent issue made me realize people are probably reaching into this component and using the state, which this PR would 'break'.\r\n\r\n@goatslacker if you have a second. Any thoughts on this?\r\n\r\n"}}
{"actor":{"display_login":"hartzis"}}