question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to make an initial placeholder slide?

See original GitHub issue

Hi. I have the carousel all hooked up and working great. THANKS a ton for this component!

The last thing I’d like to do is conditionally render a first slide if more than one slide exists. The line myProps.images[0] === image is an example of what I’m attempting to do. Is this concept possible? Thanks!

   <Carousel
    data={myProps.images}
    sliderWidth={Dimensions.get('window').width}
    itemWidth={Dimensions.get('window').width * 0.8 + 8}
    keyExtractor={image => image.id}
    renderItem={({ item: image }) => (
      <View style={myStyles.carouselItemContainer}>
        {myProps.images[0] === image && <Text>THIS IS A SUMMARY SLIDE OF THE SLIDESHOW!! :-)</Text>}
        <ProgressiveImage
          blurredImageUrl={imageUrlThumbnailSized(image.url)}
          finalImageUrl={imageUrlPostSized(image.url)}
          blurRadiusStart={3}
          blurRadiusEnd={1}
          unBlurDuration={1000}
        />
      </View>
    )}
  />

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
vonwaocommented, Oct 26, 2019

Note: I was wondering if I should just use a FlatList instead of a RN snap carousel. I found a blog post that says you can achive a similar result as a carousel with just a few additional properties on the FlatList:

            snapToAlignment={"start"}
            snapToInterval={this.IMAGE_WIDTH + 10}
            decelerationRate={"fast"}
            pagingEnabled

I guess as long as I don’t need any fancy effects on the carousel! So I will have to try this next.

1reaction
bd-arccommented, Oct 26, 2019

Oh I totally agree: if you don’t need any kind of advanced feature or effect, you’ll be better off with a regular FlatList, particularly since they made the snapToInterval prop available on Android as well 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use a Placeholder in PowerPoint | The Training Lady
It is best to use the placeholders you have on the slide first before you look to add additional placeholders or elements.
Read more >
PowerPoint Tip: Creating Custom-Shaped Placeholders
Start in the Slide Master View and insert a Slide Layout. On the new slide, add a Picture Placeholder and adjust it according...
Read more >
Create a Custom Picture Placeholder in PowerPoint
1. From the Slide Master tab, choose Insert Placeholder | Picture. · 2. Now, just move the shape wherever you want on the...
Read more >
Inserting New Placeholders Within Slide Layouts in ... - Indezine
Choose the placeholder type you want to add, and drag on the slide layout to insert the placeholder. You can insert multiple placeholders...
Read more >
How to create a custom picture placeholder in Microsoft ...
If you don't want the same rectangular pictures for your Microsoft PowerPoint slide show, create a custom-shaped picture placeholder and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found