2022-04-13
1337
#react native
Samaila Bala
29427
Apr 13, 2022 â‹… 4 min read

React Native carousel with react-native-snap-carousel

Samaila Bala I'm a frontend engineer and technical writer.

Recent posts:

Building Multi-Step Forms With React Hook Form And Zod

Building a reusable multi-step form with React Hook Form and Zod

Use React Hook Form and Zod to build a multi-step form component in React that handles input validation, tracks form progress, and more.

Chinwike Maduabuchi
Feb 26, 2025 â‹… 13 min read
JavaScript Dictionary

JavaScript dictionary: How to use objects and maps for key-value pairs

Learn how to use JavaScript dictionaries with Objects and Maps. Discover key differences, performance insights, and best use cases with practical examples.

Elijah Agbonze
Feb 25, 2025 â‹… 9 min read
A guide to the CSS grid-template-columns property

A guide to the CSS grid-template-columns property

Take a deep dive into the CSS grid template columns property, an essential part of the CSS Grid Layout specification.

Samuel Martins
Feb 25, 2025 â‹… 15 min read
A Guide To Node.js Readable Streams

A guide to Node.js readable streams

Explore how Node.js readable streams process data in small chunks, manage data flow, handle errors, and ensure resource cleanup.

Yan Sun
Feb 25, 2025 â‹… 7 min read
View all posts

8 Replies to "React Native carousel with react-native-snap-carousel"

    1. Hi Jay,

      The post has been updated. Follow the post again and rebuild your project. It will work now.

      To swipe place your first finger and index finger on the mouse pad and then make a sweep to either left or right. The image will swipe.

  1. Don’t forget to add this line to your Carousel component. I missed it too

    onSnapToItem={(index) => setIndex(index)}

    I hope it helps.

  2. Getting below error when I followed this

    TypeError: Cannot read property ‘style’ of undefined

    1. It has been fixed. Install “react-native-snap-carousel”: “^4.0.0-beta.6”. Version 3.6 is causing the issue.

  3. Swiping works but clicking the individual dots for pagination dont work. the first dot stays highlighted when clicking the second or third one.

Leave a Reply