meliorence / meliorence/react-native-snap-carousel
Property 'maxToRenderPerBatch' does not exist on type [React-Native + Typescript]
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, i have a project where i use React-Native + typescript. When I use properties maxToRenderPerBatch or initialNumToRender i have the following error when I compile my ts files into js
Property 'maxToRenderPerBatch' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Carousel<Event>> & Readonly<{ children?: ReactNode; }> & Readonly<CarouselProperties<Event>>'
Also these properties doesn't exist in @types/react-native-snap-carousel/index.d.ts
Environment
React: 16.5.0
React native: 0.57.2
react-native-snap-carousel: 3.7.5
typescript: 3.13.
types/react-native-snap-carousel": 3.7.1
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
Start with @types/react-native-snap-carousel/index.d.ts and inspect the CarouselProperties definition for maxToRenderPerBatch and initialNumToRender. Update the declarations so the reported React Native props are accepted, then verify that the example TypeScript usage compiles without the property errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100