meliorence / meliorence/react-native-snap-carousel
All args to renderItem should be optional
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
renderItem: (
baseData: { index: number; dataIndex: number; item: TData },
parallaxData: {
scrollPosition: Animated.Value | undefined,
carouselRef: ScrollView | FlatList<TData> | null,
vertical: false,
itemWidth: number,
sliderWidth: number,
}
)
All the arguments into renderItem should be optional...in theory you could do just
const renderitem = useCallback(() => <Text>Foo Bar</Text>, [])
right?
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
Review the renderItem signature shown in the issue and locate the surrounding React Native carousel typings. Verify whether a callback with no parameters type-checks, then add or update type coverage so the optional-argument behavior is confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100