#react native
Samaila Bala
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:

Comparing Cms Options For Django: Wagtail Vs Django Cms

Wagtail vs. Django CMS: Comparing CMS options for Django

Selecting a CMS for Django can be challenging. Two popular options are Wagtail and Django CMS. Let’s explore their features, pros, and cons.

Chimezie Innocent
Jun 25, 2024 ⋅ 6 min read
Handling File Uploads In Next.js Using UploadThing

Handling file uploads in Next.js using UploadThing

Manage file uploads in your Next.js app using UploadThing, a file upload tool to be used in full-stack TypeScript applications.

Jude Miracle
Jun 21, 2024 ⋅ 15 min read
Exploring Advanced Support For Vite 5 In Storybook 8

Exploring advanced support for Vite 5 in Storybook 8

Explore the latest updates in Storybook 8, focusing on its improved support for Vite 5 as a build tool.

Will Soares
Jun 20, 2024 ⋅ 5 min read
Using Next Js With React Suspense To Create A Loading Component

Using Next.js with Suspense to create a loading component

Next.js 13 introduced some new features like support for Suspense, a React feature that lets you delay displaying a component until the children have finished loading.

Suraj Vishwakarma
Jun 19, 2024 ⋅ 9 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