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.

Flicker noted on carousel implementation

See original GitHub issue
  • components: Carousel
  • reactstrap version 5.0.0.alpha.3
  • react version #16
  • bootstrap version #4.0.0.beta2

Hi,

I’ve implemented reactstrap (which is a great tool!) in my app. I’ve added a carousel at the top of my home page. It cycles 4 images with captions. I’m using the latest react. I’ve noted a flicker on my page when using the carousel. It happens every now and again and the viewable page seems to flicker/flash once for a less than a second and then everything back to normal. The flicker/flash seems to show the contents of the page below the carousel but its really hard to tell.

I’ve tried everything I can think of to correct that. I’ve even use will-change: transform css property to prepare the browser for performance. Nothing has worked.

I wonder if its an issue with react v16 or if theres an issue with using the alpha version of reactstrap. That said I can’t seem to correct the issue.

Would really appreciate some help on resolving this issue. Thank you all.

Thanks

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:18
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
david-j-leecommented, Mar 15, 2018

Expanding on @TheSharpieOne findings. A dirty fix for me was to just put a set height to .carousel-inner. This only works if your carousel does not require dynamic heights.

5reactions
havgrycommented, Mar 22, 2018

@david-j-lee In continuation of your workaround I just wanted to point out that it works with dynamic height as well (granted you’re already setting the height of the carousel). I did it like this:

JS

onEntering = ({ clientHeight }) => {
  this.setState({ carouselHeight: clientHeight })
}

onEntering is passed to the CarouselItem component, and carouselHeight is applied inline to the .carousel-wrapper.

SCSS

.carousel,
.carousel-inner {
  height: 100%;
}

.carousel-wrapper {
  // Replace transition-property from carousel transition variable
  transition: set-nth($carousel-transition, 1, height);
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Reactstrap: Flicker noted on carousel implementation
I'm using the latest react. I've noted a flicker on my page when using the carousel. It happens every now and again and...
Read more >
Carousels Tutorial | Web Accessibility Initiative (WAI) - W3C
Implement an accessible carousel widget by providing a robust structure and user control: Structure: Use semantic structure for the carousel to support proper ......
Read more >
The best ways to avoid flickering (not to f*ck up your awesome ...
Flickering is also referred to as Flash of original Content (or FOOC). It means that the user sees the original (control variation) before...
Read more >
Image Carousels and Sliders: Why You Shouldn't Use Them ...
Unless the image slider is the only thing on your website (bad idea!), it's not a good thing. The slider takes attention away...
Read more >
Carousel (aka Product Gallery) Integration – Tangiblee
Hiding the placeholder will cause it to flicker. The carousel implementation may not cause issues when the placeholder is hidden or removed. For...
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