RSCJS - React Spring Carousel JS


react-spring-carousel-js came with several solutions depending on your needs. The first solution that we'll cover is the useSpringCarousel. Note how the name reflect the kind of logic that lies under the hood. useSpringCarousel use the useSpring hook to perform the animation, while the useTransitionCarousel use the useTransition hook. Both solutions almost share the same API; what changes is the final result and the interaction between user - carousel.

For more information on the underlyng functionality of both hooks, you can check the official documentation. You can check here for the useSpring hook and here for the useTransition hook.

Note: I'll use @emotion to style my components because is what i normally use in my projects, but keep in mind that you can use whatever you like to add styes.