Pure React Carousel V2.0.0-alpha #475
Pinned
mrbinky3000
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's time to make version 2 of pure-react-carousel and it definitely will be a breaking change.
Hello, I wrote the original version of pure-react-carousel.
Carousels are annoying. And yet every marketing director loves putting them on pages to keep stuff "above the fold". Don't get me wrong, there are valid reasons for a carousel. Look at the user interface of any streaming television service. TV shows lend themselves nicely to residing in a carousel. So do product images on a product detail page. And photos in a news story. And that's about it! :-)
But seriously, I've had years to think about it and it's time for a redesign. I also HAVE to redesign. The version of node used by this library stop being supported years ago. The CI/CD process for this project broke as a result. (Github Actions no longer support node v10 LOL)
This project was first released when React was version 13. TypeScript wasn't nearly as popular as it is today. And people still primarily used classes instead of functional programming. The new carousel will use the latest React, the latest supported version of node, jest, and typescript. It will also use functional programming and React.Context instead of our home-spun store. (the modern React Context API didn't even exist back when we started)
I really thought people would like the responsive nature of the carousel. That turns out not to be the case. The number one question I get regarding PRC is "how do I make it stop stretching?" As a result, version 2 of PRC will have different "slider" components named ResponsiveViewport and StaticViewport. Pick the one you like.
The new carousel will also not try to replicate native browser scrolling and dragging. Instead, we'll rely solely on html and css scrolling and listen for scroll and scrollEnd events to track the current slide.
Finally, we will improve the documentation by leveraging Storybook.
Like I said earlier... this is definitely a breaking change. Stay tuned.
Beta Was this translation helpful? Give feedback.
All reactions