Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customSlide prop is broken?? #72

Open
thisiswhale opened this issue Sep 14, 2018 · 1 comment
Open

customSlide prop is broken?? #72

thisiswhale opened this issue Sep 14, 2018 · 1 comment

Comments

@thisiswhale
Copy link

I keep getting a black screen whenever I want to add customSlide prop. I'm using the most basic format and I still get a black screen. I'm not sure if I'm using it right. Its pretty much from the example. The code works if I comment out customSlide props.

const { width } = Dimensions.get("window");
const height = width * 0.6;

render() {
const images = [
  'https://placeimg.com/640/640/nature',
  'https://placeimg.com/640/640/people',
  'https://placeimg.com/640/640/animals',
  'https://placeimg.com/640/640/beer',
];
}
return(
<View style={{ height }}>
    <ImageSlider
      images={images}
      customSlide={({ index, item, style, width }) => (
        // It's important to put style here because it's got offset inside
        <View key={index} style={[style]}>
          <Image source={{ uri: item }}  />
        </View>
      )}
    />
<View/>
);
@nicoandriyan
Copy link

same with me, on android sometime prop index show -1, it should start from 0 right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants