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.

Why there is no working carousel for React?

See original GitHub issue

I feel like I tried all of them. This one was the most promising, but still doesn’t work at all.

Why we don’t have any working solution? Why for JQuery all of them are working, more or less, but front-end, even more advanced field, has no one single working carousel?

Why am I saying that it doesn’t work? Because it doesn’t! When you install it and try to implement the most basic example, you got an error in your console from internal code.

image

Okay, maybe need to go deeper, alright. Maybe it works, but just an error.

Next problem is that your slides are invisible If you use collection.map(item => ...). By default. Why? The hell knows. In order to fix it, need to add settings, plugins. Alright, it fixed too with pain.

Don’t you think it’s all? Naaaaaah, no way! When you want to render multiple items and one more, like

<Carousel>
        {collection.map((item) => (
          <Item key={item.id} />
        ))}
        <OneMoreComponent/>
</Carousel>

It won’t work! You’ll get all your items in one slide and OneMoreComponent in another. Why is that happening? Okay, maybe render them as fragment? Nah, then we get Maximum call stack exceeded.

And this is not only about this carousel. All of them are broken in different way. This one turned out to be top 4-3 I guess.

Why we have plenty solutions for other problems, like, modals, animations and other stuff which just WORK? Why there is no single one working carousel for React?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

8reactions
Beelphegorcommented, Jun 4, 2021

image

Are you seriously using this?

Is React.Children.toArray(this.props.children) just a joke? Of course it won’t work!

Your ramblings are not useful in any way, you should consider contributing to the project instead.

2reactions
Maclay74commented, Jun 14, 2021

Thanks God, I found it! Don’t waste your time, use swiper, it works. https://swiperjs.com/

Read more comments on GitHub >

github_iconTop Results From Across the Web

React boostrap carousel not working - Stack Overflow
According to docs: Because React-Bootstrap doesn't depend on a very precise version of Bootstrap, we don't ship with any included css. However, ...
Read more >
React Carousel with Bootstrap - examples & tutorial
Carousels don't automatically normalize slide dimensions. As such, you may need to use additional utilities or custom styles to appropriately size content.
Read more >
How to Build a Simple Carousel in React | by Aakash Jha
A carousel is nothing more than several items being rendered in a parent container block —… ... I surely enjoyed while I was...
Read more >
React-Bootstrap Carousel Component - GeeksforGeeks
React-Bootstrap Carousel Component · as: It can be used as a custom element type for this component. · bsPrefix: It is an escape...
Read more >
React Bootstrap Carousel Component
Carousels don't automatically normalize slide dimensions. As such, you may need to use additional utilities or custom styles to appropriately size content.
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