{"action":"created","issue":{"url":"https://api.github.com/repos/archriss/react-native-snap-carousel/issues/329","repository_url":"https://api.github.com/repos/archriss/react-native-snap-carousel","labels_url":"https://api.github.com/repos/archriss/react-native-snap-carousel/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/archriss/react-native-snap-carousel/issues/329/comments","events_url":"https://api.github.com/repos/archriss/react-native-snap-carousel/issues/329/events","html_url":"https://github.com/archriss/react-native-snap-carousel/issues/329","id":326527662,"number":329,"title":"More than 9 items in the data causes the Carousel to re-render all the items indefinitely ","user":{"login":"amitassaraf","id":16493770,"avatar_url":"https://avatars0.githubusercontent.com/u/16493770?v=4","gravatar_id":"","url":"https://api.github.com/users/amitassaraf","html_url":"https://github.com/amitassaraf","followers_url":"https://api.github.com/users/amitassaraf/followers","following_url":"https://api.github.com/users/amitassaraf/following{/other_user}","gists_url":"https://api.github.com/users/amitassaraf/gists{/gist_id}","starred_url":"https://api.github.com/users/amitassaraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitassaraf/subscriptions","organizations_url":"https://api.github.com/users/amitassaraf/orgs","repos_url":"https://api.github.com/users/amitassaraf/repos","events_url":"https://api.github.com/users/amitassaraf/events{/privacy}","received_events_url":"https://api.github.com/users/amitassaraf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-25T13:37:32Z","updated_at":"2018-05-25T17:48:30Z","closed_at":null,"author_association":"NONE","body":"### Is this a bug report or a feature request?\r\n\r\nBug report\r\n\r\n### Have you read [the guidelines](https://github.com/archriss/react-native-snap-carousel/blob/master/CONTRIBUTING.md) regarding bug report?\r\n\r\nYes.\r\n\r\n### Have you read [the documentation](https://github.com/archriss/react-native-snap-carousel/blob/master/README.md) in its entirety?\r\n\r\nYes.\r\n\r\n### Have you made sure that your issue hasn't already been reported/solved?\r\n\r\nYes.\r\n\r\n### Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?\r\n\r\nI only have an iOS device so I am not sure.\r\n\r\n### Is the bug reproductible in a production environment (not a debug one)?\r\n\r\nYes.\r\n\r\n### Have you made sure that it wasn't a [React Native bug](https://github.com/archriss/react-native-snap-carousel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22react-native+bug%22+)?\r\n\r\nYes\r\n\r\n### Have you been able to reproduce the bug in [the provided example](https://github.com/archriss/react-native-snap-carousel/tree/master/example)?\r\n\r\nYes\r\n\r\n### Environment\r\n\r\n  Environment:\r\n    React: 16.2.0\r\n    React native: 0.49.0\r\n    react-native-snap-carousel: 3.7.0\r\n\r\n  Target Platform:\r\n    iOS (8.0)\r\n\r\n### Steps to Reproduce\r\n\r\n1. Render a carousel with 9 items and console.log when the renderItem function is called.\r\n2. See that it only renders the items once, as it should.\r\n3. Then add a 10th item to the data array, and see how the renderItem methods is called indefinitely on every item. \r\n\r\n```\r\n<Carousel\r\n                            data={[{a: '2'}, {a: '44'}, {a: '21'}, {a: '2'}, {a: '33'}, {a: '11'}, {a: '6'}, {a: '77'}, {a: '99'}, {a: '01'}]}\r\n                            renderItem={({item, index}) => {\r\n                                console.log('== RENDER ITEM == ' + index);\r\n                                return <View />\r\n                            }}\r\n                            sliderWidth={Window.width}\r\n                            itemWidth={Window.width}\r\n                        />\r\n```\r\n\r\n### Expected Behavior\r\n\r\nI thought that I would only see render calls to the items that are visible and the rest would only be called ONCE they are visible.\r\n\r\n### Actual Behavior\r\n\r\nThe carousel constantly rerenders the items non stop.\r\n\r\n![image](https://user-images.githubusercontent.com/16493770/40547150-c70f62de-6039-11e8-9f2e-3311dbc5ee31.png)\r\n"},"comment":{"url":"https://api.github.com/repos/archriss/react-native-snap-carousel/issues/comments/392132383","html_url":"https://github.com/archriss/react-native-snap-carousel/issues/329#issuecomment-392132383","issue_url":"https://api.github.com/repos/archriss/react-native-snap-carousel/issues/329","id":392132383,"user":{"login":"amitassaraf","id":16493770,"avatar_url":"https://avatars0.githubusercontent.com/u/16493770?v=4","gravatar_id":"","url":"https://api.github.com/users/amitassaraf","html_url":"https://github.com/amitassaraf","followers_url":"https://api.github.com/users/amitassaraf/followers","following_url":"https://api.github.com/users/amitassaraf/following{/other_user}","gists_url":"https://api.github.com/users/amitassaraf/gists{/gist_id}","starred_url":"https://api.github.com/users/amitassaraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitassaraf/subscriptions","organizations_url":"https://api.github.com/users/amitassaraf/orgs","repos_url":"https://api.github.com/users/amitassaraf/repos","events_url":"https://api.github.com/users/amitassaraf/events{/privacy}","received_events_url":"https://api.github.com/users/amitassaraf/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T17:48:30Z","updated_at":"2018-05-25T17:48:30Z","author_association":"NONE","body":"@bd-arc Yes the ScrollView is definitely not a direct child of ScrollView. React Navigation might be using a ScrollView somewhere, could this be the issue?"}}
{"actor":{"display_login":"amitassaraf"}}