{"action":"created","issue":{"url":"https://api.github.com/repos/leecade/react-native-swiper/issues/221","repository_url":"https://api.github.com/repos/leecade/react-native-swiper","labels_url":"https://api.github.com/repos/leecade/react-native-swiper/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/leecade/react-native-swiper/issues/221/comments","events_url":"https://api.github.com/repos/leecade/react-native-swiper/issues/221/events","html_url":"https://github.com/leecade/react-native-swiper/issues/221","id":173110988,"number":221,"title":"Change page  according to given page number","user":{"login":"uc-asa","id":16412197,"avatar_url":"https://avatars.githubusercontent.com/u/16412197?v=3","gravatar_id":"","url":"https://api.github.com/users/uc-asa","html_url":"https://github.com/uc-asa","followers_url":"https://api.github.com/users/uc-asa/followers","following_url":"https://api.github.com/users/uc-asa/following{/other_user}","gists_url":"https://api.github.com/users/uc-asa/gists{/gist_id}","starred_url":"https://api.github.com/users/uc-asa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uc-asa/subscriptions","organizations_url":"https://api.github.com/users/uc-asa/orgs","repos_url":"https://api.github.com/users/uc-asa/repos","events_url":"https://api.github.com/users/uc-asa/events{/privacy}","received_events_url":"https://api.github.com/users/uc-asa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/leecade/react-native-swiper/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-25T04:19:50Z","updated_at":"2016-08-25T05:33:51Z","closed_at":null,"body":"I need to change page according to given page number dynamically"},"comment":{"url":"https://api.github.com/repos/leecade/react-native-swiper/issues/comments/242285100","html_url":"https://github.com/leecade/react-native-swiper/issues/221#issuecomment-242285100","issue_url":"https://api.github.com/repos/leecade/react-native-swiper/issues/221","id":242285100,"user":{"login":"getnashty","id":113112,"avatar_url":"https://avatars.githubusercontent.com/u/113112?v=3","gravatar_id":"","url":"https://api.github.com/users/getnashty","html_url":"https://github.com/getnashty","followers_url":"https://api.github.com/users/getnashty/followers","following_url":"https://api.github.com/users/getnashty/following{/other_user}","gists_url":"https://api.github.com/users/getnashty/gists{/gist_id}","starred_url":"https://api.github.com/users/getnashty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getnashty/subscriptions","organizations_url":"https://api.github.com/users/getnashty/orgs","repos_url":"https://api.github.com/users/getnashty/repos","events_url":"https://api.github.com/users/getnashty/events{/privacy}","received_events_url":"https://api.github.com/users/getnashty/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T05:33:51Z","updated_at":"2016-08-25T05:33:51Z","body":"Currently, thats not how the component works, the index property only sets the initial state - it does not command the current index.\r\n\r\nWhen the Swiper component mounts, whatever the value of the index property is, is where the swiper will start - so if you re-render it with a new index, it will certainly change.\r\n\r\nThat said, you're better off calculating the index and using scrollBy() as mentioned earlier. \r\n\r\nIf you're having trouble using your ref, it probably means you're trying to access it before the component has finished mounting / rendering - and therefore isn't available yet. \r\n\r\nTo work around this, you should use a timeout, or placeholder value somewhere else so you can access the ref. I'm not sure if this is the correct way to do this - would love to hear input from anyone else on the matter (but google hasn't shown be a better way of dealing with it)."}}
{"actor":{"display_login":"getnashty"}}