Jacse / react-native-app-intro-slider

Simple and configurable app introduction slider for react native
MIT License
1.66k stars 330 forks source link

argument type of `renderItem` should be ItemT #191

Closed pke closed 4 years ago

pke commented 4 years ago

This is great library! It has every customisation feature I'd hoped for! Kudos! 🚀

One little question though re the renderItem render function: Its currently defined as: renderItem: (a: any) => React.ReactNode; wouldn't it be possible to define it as renderItem: (a: ItemT) => React.ReactNode;?

Jacse commented 4 years ago

Absolutely! Let me know if it looks good on version 4.0.4

pke commented 4 years ago

Somehow even though the typedefs are correct now, VSCode still complains. image

But as you can see I have defined a type named Item like this:

type Item = {
  id: string
  title: string
  text: string
  image: ImageSourcePropType
}

Could that be a caching problem?