meliorence / meliorence/react-native-snap-carousel
Cannot read property 'array' of undefined
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hill @all,
Please Help me, when I am using this getting the given error.
Cannot read property 'array' of undefined?
sample code:
<Carousel
ref={ref}
layout={'default'}
scrollEnabled={true}
showsVerticalScrollIndicator={false}
loop={true}
data={carouselData}
renderItem={renderItem}
sliderWidth={100}
itemWidth={100}
firstItem={0}
itemHeight={40}
onSnapToItem={index => setIndex(index)}
/>
const carouselData = [
{id: 1, name: 'Test'},
{id: 2, name: 'Series'},
{id: 3, name: 'Cont'},
];
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start by reproducing the error with the provided Carousel and carouselData sample, then inspect the Carousel entry point and the renderItem usage to identify which value is undefined. Done means the sample no longer raises the error and the relevant regression is covered by a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100