here is it github.com/Prashantrajput11/custom-carousel
@lalithchakradhar2510
4 ай бұрын
@@theawesomedev_ thank you so much bro❤. Your code made my life easy. The React Native snap carousel and reanimated carousel was not working for me on my local machine.
@electromorphous
11 ай бұрын
After doing scrollPosition / screenWidth I suggest doing Math.round(index), and then set the active index.
@BirupakshaDey-we7st
4 ай бұрын
Thanks For suggestion
@imedhamdaoui1107
4 ай бұрын
nice work Bro, You can use Math.round(index), make the indicator react befor the user ends the scroll of the image (exactly in the half on scrolling the image )
@dave_an
3 ай бұрын
So easy to understand, thanks bro❤
@SurajTopal-e6i
Жыл бұрын
Thank you brother, Working fine. 🤩🤩🤩🤩🤩😍😍😍😍😍😍😍
@BirupakshaDey-we7st
4 ай бұрын
Good explanation
@gauthamvijayan
3 ай бұрын
Awesome work!
@okeypraisejunior7527
4 ай бұрын
God bless you!
@theawesomedev_
4 ай бұрын
thank you 😊😇
@developerpranav
Жыл бұрын
I was looking for react, not react native, but beautiful work man!!
@theawesomedev_
Жыл бұрын
glad you liked it
@ezekielakintunde4816
6 ай бұрын
Thank you bro
@theawesomedev_
5 ай бұрын
most welcome 🤗
@fanziermuzic2087
11 ай бұрын
Thank you brother 🎉, it's working fine 💖
@tsuryaprakashreddy2245
4 ай бұрын
awesome explanation
@theawesomedev_
4 ай бұрын
Glad you liked it
@deveshtembheker1315
6 ай бұрын
धन्यवाद गुरु ❤
@infernobot9188
Жыл бұрын
Thank you so much , works perfectly
@theawesomedev_
Жыл бұрын
Glad it helped
@Legend_UP61
Жыл бұрын
and es pr ek useMemo me bhi ek video bnaiye kyuki jo bahut sare api use honge es page pr to baar baar sb rerender hoga
@АлишерРизабаев-ш8ж
Жыл бұрын
Thank you very much
@theawesomedev_
Жыл бұрын
😇❤️💫
@shipalanaships9583
7 ай бұрын
Thanks bro
@nqmgaming2004
6 ай бұрын
nice
@theawesomedev_
6 ай бұрын
thank you 😊
@ChakraofSoulA
11 ай бұрын
always i am getting this error "Invariant Violation: scrollToIndex out of range: requested index 11 is out of 0 to 2, js engine: hermes"
@BukkyOdunsi
6 ай бұрын
Whats the clearInterval for?
@Legend_UP61
Жыл бұрын
very very thanks sir, eske liye package download krna pdta tha ,but ek questiion hai mera , jaise apn like a tiktok scroll video bnate hai flatlist me to fast scroll krne pr multiple scroll ho jata hai , any solution ?
@theawesomedev_
Жыл бұрын
have not tried bhai but will make a video on this as well! is par video jald hi 😇
@ambikarajkumar5472
11 ай бұрын
Thanks for the code, for android auto scrolling is working but it stops at the last image after that its not scrolling and in the dot indicator first dot only changing the color into green which means first image only mapping but for 2nd and 3rd image its not changing the color, please let me know where to correct it
@theawesomedev_
11 ай бұрын
yes i noticed this too that it is not working for android but i have not figured the workaround out yet
@shahamaNew-cy6mk
10 ай бұрын
useEffect(() => { let interval = setInterval(() => { if (activeIndex === carouselData.length - 1) { flatListRef.current.scrollToIndex({ index: 0, animated: true, }); setActiveIndex(0); // Reset the active index to 0 } else { flatListRef.current.scrollToIndex({ index: activeIndex + 1, animated: true, }); setActiveIndex((prevIndex) => prevIndex + 1); } }, 2000); return () => clearInterval(interval); }, [activeIndex]); this will solve
@Legend_UP61
Жыл бұрын
aur agar tik tok jaisa sroll bnana ho with full functionality to flatlist sahi rhega ya react-native-deck-swiper package
@theawesomedev_
Жыл бұрын
depends apki preference kya hai , flatlist ka use karke aap sara control apne hath me le sakte to kaise bhi customise kar sakte ho V/S kisi external package ka use karke fast bna skte hi but control nhi raheta pura! at the end of the day ye ap par depend karta hai! baki you can try both
@Legend_UP61
Жыл бұрын
@@theawesomedev_ thanks
@TheKurtaaGuy
6 ай бұрын
Bhaiya aap continue video dalo
@shankardakolia4912
Жыл бұрын
Sir I followed your video and created the project on IOS it works but in android auto scroll don't works and on manual scrolling only first image colour changes and the rest two doesn't
@theawesomedev_
Жыл бұрын
Yes ! i just checked it out on android. Will soon find a fix and let you know. Thanks for pointing that out
@shankardakolia4912
Жыл бұрын
@@theawesomedev_ Thanks sir
@shahamaNew-cy6mk
10 ай бұрын
heres the fix useEffect(() => { let interval = setInterval(() => { if (activeIndex === carouselData.length - 1) { flatListRef.current.scrollToIndex({ index: 0, animated: true, }); setActiveIndex(0); // Reset the active index to 0 } else { flatListRef.current.scrollToIndex({ index: activeIndex + 1, animated: true, }); setActiveIndex((prevIndex) => prevIndex + 1); } }, 3000); return () => clearInterval(interval); }, [activeIndex]);
@mujahidali8691
2 ай бұрын
@@theawesomedev_ Sir aap kabh fix karonge because auto scroll it works only on ios but not on android and on manual scrolling only first dot colour changes and the rest two doesn't
@shahamaNew-cy6mk
10 ай бұрын
If the auto-scroll stops at the last image here's the fix useEffect(() => { let interval = setInterval(() => { if (activeIndex === carouselData.length - 1) { flatListRef.current.scrollToIndex({ index: 0, animated: true, }); setActiveIndex(0); // Reset the active index to 0 } else { flatListRef.current.scrollToIndex({ index: activeIndex + 1, animated: true, }); setActiveIndex((prevIndex) => prevIndex + 1); } }, 2000); return () => clearInterval(interval); }, [activeIndex]);
@Raghunadh9
5 ай бұрын
Thank you so much bro, literally you saved my day 😊
Пікірлер: 48