React Native Animated Tabs & Animated Indicator using FlatList

  Рет қаралды 69,764

Catalin Miron

Catalin Miron

Күн бұрын

🔥 Create a React Native Animated Tabs indicator / Dynamic Tabs indicator that will dynamically change its width and position based on React Native FlatList scrollX.
In this video tutorial we'll learn how to create:
- learn how to create an animated tabs using React Native FlatList
- learn how to animate a tabs indicator
- learn how to create an animated tabs indicator using Animated API
- learn how to measureLayout and use React Native findNodeHandle
Built using @expo, vanilla React Native Animated API and FlatList.
This code works in plain React Native project as well since we are using only React Native APIs such as Animated and FlatList in order to create a React Native Animated Tabs and Animated tabs indicator that will scale and position according to the active slide from the FlatList.
----
⚠️ Access full source code: www.patreon.com/bePatron?u=20...
----
Starter code: gist.github.com/catalinmiron/...
👉👉 Have any questions? Join Discord: / discord .
Want to support me?
- Patreon: / catalinmiron
- BuyMeACoffee: www.buymeacoffee.com/catalinm...
- Paypal: paypal.me/catalinmiron
----
You can find me on:
- Github: github.com/catalinmiron
- Twitter: / mironcatalin
- Website: batman.codes
Timeline:
00:00 Introduction + What we’re going to build
00:56 Boilerplate + starter code link
02:19 Create the Animated FlatList
05:15 Create Animated.Value ref for FlatList
06:20 Create Tabs component
07:10 Create Tab component
09:30 Create Tabs Indicator component
10:30 Get the Tabs measurements using measureLayout and findNodeHandle
12:40 How React Native ref measureLayout works
16:50 Animated Indicator width and x based on FlatList scrollX position
20:10 Last part, press on tab to modify FlatList scrollOffset
23:14 Final words and thanks
#react-native-tabs #react-native-flatlist #react-native-tabs-animation #react-native-dynamic-underline-animation #react-native-animated-tabs-indicator

Пікірлер: 222
@npc73x
@npc73x 2 жыл бұрын
Such a valuable content,that go through multiple steps, keep doing your awesome work
@mpeguese210
@mpeguese210 10 ай бұрын
@Catalin This tutorial helped me complete revamp a project I was working on. Thanks for much man for all the Support you give the RN Community.
@hwj8640
@hwj8640 2 жыл бұрын
Amazing video, I really enjoy your tutorial. You explain everything very well.
@techienomadiso8970
@techienomadiso8970 3 жыл бұрын
My guy, the world needs to know of you. Your content is quality. People are missing out if they don't know this channel
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thank you so much Francis for showing your appreciation, it means a lot to me ✌️
@optimusdebugger9638
@optimusdebugger9638 3 жыл бұрын
just discovered him but he's dropping some bomb
@jamieblair4336
@jamieblair4336 3 жыл бұрын
Not all heroes wear capes. Thank you Catalin for an awesome tutorial.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Glad it was helpful! Hat down Jamie ✌️
@collocheru
@collocheru 3 жыл бұрын
This is incredible and the explanations of the steps is super helpful, great video 🙏
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Glad it was helpful! Thank you Cheruiyot! ✌️
@amanmittal416
@amanmittal416 3 жыл бұрын
This video has the best intro I've ever seen (*the sideways head tilt part!*) 🎃
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
hahaha thanks Aman! ✌️🤗
@GuperGER
@GuperGER 3 жыл бұрын
Wow! This is looking awesome! I'm currently working in Xamarin Forms but after watching some of your videos I can definately see me trying out React Native :) Keep it up! :)
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks a lot, I’m glad you found it useful ✌️ Thanks Vicent!
@shareef2178
@shareef2178 3 жыл бұрын
I rarely subscribe to channels but this channel is worth to subscribe to, thanks a lot for your hard work, keep it up, I love your content.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thank you so much Syarif! It means a lot to me ✌️
@facundofernandez1144
@facundofernandez1144 3 жыл бұрын
Your videos are excellent, thank you very much for sharing this content. I am always waiting for the next one to learn more. Greetings from Argentina.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks a lot, I’m glad you found it useful ✌️ Thanks Facundo ✌️
@anshul9856
@anshul9856 2 жыл бұрын
Very helpful video! Makes me happy to know such smart people are in the same field as me :)
@619dixitrock
@619dixitrock 3 жыл бұрын
Really helpful content. I didn't find any good content in KZbin for react native Animations. This one really is interesting and got lot of information.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks for sharing your feedback Dixit. I’m glad you found my videos useful ✌️
@prakashd842
@prakashd842 3 жыл бұрын
Thanks for sharing such a valuable content , we are thankful
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
So nice of you! Thanks Prakash! ✌️
@faizanansari975
@faizanansari975 3 жыл бұрын
@@CatalinMironDev i have a share a small video on ur Twitter handle please check the dm n plz make a video by achieving that in react native flatlist
@erlanakylbekovich4586
@erlanakylbekovich4586 3 жыл бұрын
I really liked your videos. More of these videos. This part of awesome!
@aftabamin8508
@aftabamin8508 3 жыл бұрын
thanks, dude. you have made my life easier with these great tutorials. love from Pakistan. if I get a chance I will meet you in my life.
@cli23
@cli23 3 жыл бұрын
Great stuff as always, Catalin!
@wom987
@wom987 3 жыл бұрын
Amazing tutorial bruh! you got a new sub!
@yakupdurmus3008
@yakupdurmus3008 Жыл бұрын
Thanks for this tutorial ! Nice content
@philipprajahmourasrivastav2398
@philipprajahmourasrivastav2398 3 жыл бұрын
Amazing video, thank you so much for shedding light on how some basic animations work. One thing that I however ran into was the the indicator wouldn't show up until it did a hot reload. Whenever I would run the app from scratch the indicator wouldn't be there. I found this to be because ref.current.measureLayout was initially returning 0 for all of the values. I'm not sure why but if anyone else runs into this my solution was to put the ref.current in the array at the end of the useEffect. This essentially makes sure that useEffect runs again whenever ref.current changes (like a component will update). Hope this helps someone. Thanks again! Also video suggestion from me would be a collapsible view that collapses when you begin scrolling a list below it.
@DaveBatistaa
@DaveBatistaa 2 жыл бұрын
Thank you so much, Sir!
@angNguyen-cg8gk
@angNguyen-cg8gk 2 жыл бұрын
can you please help me, in this case what exactly "the ref.current"
@shafqatullah6666
@shafqatullah6666 2 жыл бұрын
@@angNguyen-cg8gk same here... no value "[object Object],[object Object],[object Object],[object Object],[object Object]"
@cuongnguyen1230
@cuongnguyen1230 Жыл бұрын
Thank you, a lot...
@BDCCNVUONGANKHANG
@BDCCNVUONGANKHANG 6 ай бұрын
thanks you so much bro, my problem is same. I fixed it, yeah
@HOWGLAI
@HOWGLAI 2 жыл бұрын
Thank you MAN! That`s amazing
@darianaorlova2405
@darianaorlova2405 3 жыл бұрын
This is very useful for me video, thank you. You're cool.
@usamaali736
@usamaali736 3 жыл бұрын
another excellent and insightful video as always!
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks a lot Usama! ✌️
@radomirmijovic2605
@radomirmijovic2605 Жыл бұрын
Thanks man! Great video
@re.liable
@re.liable 3 жыл бұрын
That was freaking awesome!
@capy7773
@capy7773 2 жыл бұрын
You're awesome, I like your content. Keep going!
@riccardomirarchi4136
@riccardomirarchi4136 3 жыл бұрын
you are doing great man! thanks so much, love your contents
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Glad you like them! Cheers Riccardo! ✌️
@Amitk7950
@Amitk7950 3 жыл бұрын
Thanks for making good stuff, learning from your tutorial 👍
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks a lot Amit, I’m glad you found it useful ✌️
@TaiBradCDinh
@TaiBradCDinh Жыл бұрын
amazing job man, thanks a lot
@luispaulo5714
@luispaulo5714 3 жыл бұрын
Hey this is awesome. i learned so much with you. thank you so much for give me with billions of ideas.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
You’re more than welcome and I’m happy that you found the videos inspiring. Sharw what you’re building with us, you can join the discord, there’s a dedicated channel for sharing code there. Thanks Luis ✌️
@luispaulo5714
@luispaulo5714 3 жыл бұрын
Yeah! i want to code some UI clone using your content about shared element and animations. How can i find you on linkedin to quote you there about teachings? Thanks man!
@sinaebr7337
@sinaebr7337 3 жыл бұрын
wonderful. thanks Man also thank you for putting starter code.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
You’re welcome! I’m listening to your feedback and this is what came a lot, to add the starter code. Thanks Sina ✌️
@ludwigvillalba1886
@ludwigvillalba1886 Жыл бұрын
Thanks for sharing!
@thesage86
@thesage86 3 жыл бұрын
Hey Amazing tutorial man I'm on a project in which I'm using hashmap instead of array of images So, Will hashmap work in place of arrayin Flatlist section ?? plus what is the font u r using in VSCode ??
@tinpham1052
@tinpham1052 3 жыл бұрын
perfect bro, please create more video :D
@Pupu._
@Pupu._ 2 жыл бұрын
it's difficult for me I really should repeat watching it . thank you for the amazing video !!
@minotuki100
@minotuki100 3 жыл бұрын
Hey Catalin. Thanks for this tuto! Your method with forwardRef is so useful and I feel better to use functionals components with Animated than the class components. I added myself the challenge to have useNativeDriver:true. For that, I use scaleX instead of width. I share here the new scrollX interpolations : const scaleX = scrollX.interpolate({ inputRange, outputRange: measures.map((item, i) => i > 0 ? item.width / measures[0].width : 1 ), }); const translateX = scrollX.interpolate({ inputRange, outputRange: measures.map( (item, i) => item.x + item.width / 2 - measures[0].width / 2 ), }); And new styles for the Animated.View are : width: measures[0].width, transform: [{ translateX }, { scaleX }],
@sunnymittal1906
@sunnymittal1906 Жыл бұрын
A slightly simpler way to do this might be as follows: const indicatorWidth = scrollX.interpolate({ inputRange, outputRange: measures.map((measure) => measure.width), }); // Same as video const translateX = scrollX.interpolate({ inputRange, outputRange: measures.map((measure) => measure.x + measure.width / 2), }); // mostly the same but adding measure.width / 2 to compensate for how scaling works Then the changed indicator style would just be: width: 1, transform: [{ translateX }, { scaleX }],
@PrakashChAwal
@PrakashChAwal 3 жыл бұрын
Nice content !! Can you make a basic understanding of the react-native reanimated series?
@mirzairshad4063
@mirzairshad4063 3 жыл бұрын
Wooww what a creative work bro thank you very very much hero of my life
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks a lot Mirza✌️
@kasraafshari4293
@kasraafshari4293 3 жыл бұрын
Hey man you are amazing! thank's for your awesome videos!
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thank you Kasra, I’m happy that you found them useful. ✌️
@deepakchoudhary3066
@deepakchoudhary3066 2 жыл бұрын
Awesome work, Just if i want to change the active tab text color as well how can i do that ?
@ehtishamtahir2187
@ehtishamtahir2187 2 жыл бұрын
Amazing man... You are awesome
@sarahali-wn5sd
@sarahali-wn5sd 3 жыл бұрын
Can you please do a page curl flip animation like ebooks? Thaanks for the amazing tutorials btw!
@nguyennam6774
@nguyennam6774 2 жыл бұрын
Thanks alot for your sharing. I follow your guides up to push(x,y,width,height) after measureLayout to above array then i got empty. I cannot put to that array so cannot setstate
@thenriquedb
@thenriquedb Ай бұрын
Awesome content!
@mausambhalekar1378
@mausambhalekar1378 3 жыл бұрын
Sir you are amazing thank you so much
@cuongnguyen1230
@cuongnguyen1230 Жыл бұрын
Great video! How can I change the text color? Did you have any idea about it?
@DeCodewithMinte
@DeCodewithMinte 3 жыл бұрын
Awesome tutorial very helpful
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks a lot, I’m glad you found it useful ✌️
@Alijanadeli
@Alijanadeli 3 жыл бұрын
Hi, Thankyou for wonderfull content!
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Glad you enjoy it! Thanks Alijan ✌️
@skippybassmaster7268
@skippybassmaster7268 Жыл бұрын
As usual love your content. I'm looking for a way to do exactly this, but where the tabs are scrollable. I'm having hard time to find the active index tab position to scroll my indicator to the right spot. Any idea ?
@duxuan4957
@duxuan4957 3 жыл бұрын
"Cảm ơn" - Thank you. "Rất hữu ích" - Very useful
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
"Cảm ơn" ✌️
@duxuan4957
@duxuan4957 3 жыл бұрын
@@CatalinMironDev I think I and many RNers are looking forward to Ripple Effect of Material Design Buttons for both ios and android. Was it too difficult for you?
@ed3osp
@ed3osp Жыл бұрын
Awesome job
@zouletterider4797
@zouletterider4797 2 жыл бұрын
hi thank for the tutorial, is it possible to add lazy load on such tabs ?
@fixocsolutions2695
@fixocsolutions2695 3 жыл бұрын
can i use scrollview instead of row in tabs and measure width and x of childs
@annhienofficial8000
@annhienofficial8000 3 жыл бұрын
what a great tutorial
@marchabib8168
@marchabib8168 2 жыл бұрын
Hello ! Amazing vidéo ! I just have one question : You imported "findNodeHandle" but never used it. What is this for ?
@mehdiamiri5418
@mehdiamiri5418 2 жыл бұрын
hey Catalin thank you for your great video but i have a problem.indicator behaves so bad when tab items increases. you used .map for rendering tab titles but i changed it to flatlist because i have 8 tab titles. after that when i swipe to other tab , indicator position completely treats wrong
@thenoob8682
@thenoob8682 Жыл бұрын
awsome... thank you man. I tried it . unfortunately my TabIndicator not rendering on the first time. but if I refresh the screen it appears.
@nathan8541
@nathan8541 Жыл бұрын
Put containerRef.current in the array at the end of the useEffect
@vigneshwaraneswaramoorthi4117
@vigneshwaraneswaramoorthi4117 2 жыл бұрын
Any performance issue will happen, when I create ref for each array item?
@andreaintech4305
@andreaintech4305 2 жыл бұрын
Hi! Thank you so much for your videos. I have a question: where did you use 'findNodeHandle'?
@call_me_rusker
@call_me_rusker Жыл бұрын
I had the same question…😮
@filouledoux
@filouledoux 3 жыл бұрын
Great video! Quick question, why not use the new Pressable component?
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Great suggestion, I’ll do it in the next videos. Thanks ✌️
@aqdasilyas2768
@aqdasilyas2768 3 жыл бұрын
Amazing video brother ... One thing I want to ask that how can I change different components instead of different images on background ... In this video, when i click specific text it appears image related to that text.... But now I want that when i click on specific text... it shows a component instead of image ... how can i doo that ? please answer me as soon as possible because it helps me in my project
@rosoonbphingkhue205
@rosoonbphingkhue205 2 жыл бұрын
Thanks a lot 👍👍👍👍👍
@johnny719top
@johnny719top 2 жыл бұрын
very good video!!
@mytube5182
@mytube5182 2 жыл бұрын
Cool..you are awsome dude..
@animeshsrivastava1159
@animeshsrivastava1159 3 жыл бұрын
Hi, really like your videos. Is it possible to have a dynamic react component for each tab in place of the image? Meaning different ( varying in tags ) structure for each of the tabs rather than having an image?
@sunnymittal1906
@sunnymittal1906 Жыл бұрын
The only thing governing the dimensions of the component (currently an image) is the outer ...you can put anything inside it
@gabrr
@gabrr 3 жыл бұрын
Awesome content bro
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thank you Gabriel ✌️
@__edward
@__edward 2 жыл бұрын
How do I disable the swipe gesture? I want to only scroll on the tab press.
@hosamashraf8083
@hosamashraf8083 3 жыл бұрын
Thanks for sharing this. Can I ask why didn't you use the onLayout prop of a View to calculate the view measurements?
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Because I wanted to get the measurements based on the parent container. Thanks ✌️
@hosamashraf8083
@hosamashraf8083 3 жыл бұрын
Catalin Miron onLayout also gives the measurements based on parent view right? Pardon me if I'm wrong.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
@@hosamashraf8083 you are right measureLayout and onLayout give you back the same thing, but onLayout it’s a method that exists in the children and I wanted to have access to children from the parent via ref. Ref is more powerful for this example. Thanks ✌️
@hosamashraf8083
@hosamashraf8083 3 жыл бұрын
@@CatalinMironDev Thanks for the explaining. 🙌
@sidilain5533
@sidilain5533 3 жыл бұрын
Can you done this with react Viewpager? that component only exposes onPageScroll property, instead onScroll, greetings from México.
@newtonsazzad748
@newtonsazzad748 11 ай бұрын
where did you use the findNodeHandle?
@4hiphop1
@4hiphop1 Жыл бұрын
Man you are top
@romankoncek150
@romankoncek150 2 жыл бұрын
Good job, few things I'd do differently. 1. Using onLayout prop for measurements instead all of these refs would make it more simple 2. You could use scaleX transformation instead of width so you can use native driver to have better performance 3. It is not possible to set the animation duration when pressing tabs, because scrollToOffset method does not support it. I guess the only way to solve this is to basically implement the scroling by yourself which is a lot of effort.
@amisckass9550
@amisckass9550 Жыл бұрын
How I can do it with onLayout share with us code source?
@andrzejhanusek7749
@andrzejhanusek7749 3 жыл бұрын
Great stuff!
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Thanks a lot Andrzej ✌️
@Jitsandcrypto
@Jitsandcrypto 2 жыл бұрын
Beautiful
@BrkCnAka
@BrkCnAka 3 жыл бұрын
It looks so good. What do we need to do to be scrollable when the data length is 10? Thanks.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
@@BrkCnAka that’s a great question and suggestion on the same time. I’m going to tackle this problem in a future video, where the tabs are inside a scrollable view. Thanks ✌️
@BrkCnAka
@BrkCnAka 3 жыл бұрын
@@CatalinMironDev Thank you for coming back. I'm looking forward to it.
@adarshjaiswal7334
@adarshjaiswal7334 3 жыл бұрын
@@CatalinMironDev Yeah, that's a genuine point.
@adarshjaiswal7334
@adarshjaiswal7334 3 жыл бұрын
@@CatalinMironDev Eagerly waiting for this.
@tahashaikh1733
@tahashaikh1733 2 жыл бұрын
how do you scroll these tabs for active slide if it is more thn 5 ?
@Sara-po1jd
@Sara-po1jd 9 ай бұрын
in your indictator you are doing this const indicatorWidth = scrollX?.interpolate({ inputRange, outputRange: measures.map((measure) => measure.width), }); const translateX = scrollX?.interpolate({ inputRange, outputRange: measures.map((measure) => measure.left), }); What I would l. iketo do is to use the useAnimatedStyle instead , Iam using teh Animated imported from react-native-reanimated.. any suggestion?
@sukhvindersingh6185
@sukhvindersingh6185 3 жыл бұрын
Awsome man!
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Glad you think so! Thanks Sukhvinder! ✌️
@williammendonca9975
@williammendonca9975 3 жыл бұрын
Okay, I'm Brazilian and I follow your content. Congratulations on the work. One question. Will I have access to GitHub codes on any Patreon plan?
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Hi William, yes, Patreons will have access to GitHub source codes (for this tutorial but for many others). I’ve already posted there the code for another 3 upcoming tutorials. Thanks once again ✌️
@williammendonca9975
@williammendonca9975 3 жыл бұрын
@@CatalinMironDev I'm already a Patreon. I just signed up and made PayPal payment. Let's code.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
@@williammendonca9975 thanks a lot and welcome to the club! ✌️
@akashraj4901
@akashraj4901 2 жыл бұрын
Can you please tell me how to make the tabs horizontally scrollable?
@feritejakusuma8450
@feritejakusuma8450 3 жыл бұрын
Thanks for the amazing tutorial. i'm new in .JS and i learned a lot from your video, and i wanna ask, at 21:12 . what is ( ref?.current?.scrollToOffset({....}) ) mean ? , why there is question mark there ?
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Hi Feri, great question and sorry for missing this out in my explanation. The question mark it’s called optional chaining (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) and is checking if the left hand side exists otherwise returns undefined. Eg: if(obj && obj.key && obj.key.subKey) Can be translated to obj?.key?.subKey Thanks and I hope that this was helpful. ✌️
@erkangorgulu6013
@erkangorgulu6013 3 жыл бұрын
Thank you very much for the video. I used scrollview for tabs and made it work. However I am trying make the tab scrollview to scroll when I change the screen. Creating a ref for tab scrollview is the way to go or you would have a different approch in mind ? Thanks in advance.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Creating a ref for tab scrollview and using `scrollToOffset` should do the trick. Thanks Erkan! ✌️
@adarshjaiswal7334
@adarshjaiswal7334 3 жыл бұрын
was you able to make it work completely making tab scrollable. Would you mind sharing code here.
@chhornponleu8191
@chhornponleu8191 3 жыл бұрын
@@CatalinMironDev I followed your recommendation, but the indicator doesn’t play nicely with scroll view.
@NonSense1311
@NonSense1311 Жыл бұрын
What about multi columns/pages by flatlist and dots indicator?
@samidebayroune3478
@samidebayroune3478 Жыл бұрын
can we do it with components instead of flatlist ?
@plataformameugym
@plataformameugym 3 жыл бұрын
what font you used in vscode?
@amilalisahil6882
@amilalisahil6882 2 жыл бұрын
which font are you using
@carlosandresafanadorcabal2801
@carlosandresafanadorcabal2801 2 жыл бұрын
this is gold
@narencool236
@narencool236 9 күн бұрын
How you got that font in vscode?
@BehindTheIssues
@BehindTheIssues 3 жыл бұрын
Hi Catalin, grate job, please make tabs scrollable
@attran7775
@attran7775 3 жыл бұрын
Can I scroll horizontal tabs bar?
@isidorsajinovic5573
@isidorsajinovic5573 3 жыл бұрын
Hey man! Excellent job! I have one bug here. My measurement is done before render and when I start my app indicator never shows up because measurements are always zero (x, y, width and height are zero). When I remove [ ] in useEffect hook it works but it isn't smooth. Do you have any idea how to solve that?
@soumyaranjansahu4519
@soumyaranjansahu4519 Жыл бұрын
use measures in your dependancy array in useEffect
@oriarazi
@oriarazi 3 жыл бұрын
Thanks! How can I actually know which one is shown ? I want to make the current shown tab’s header bold and the rest normal
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Hi, check my latest video, I'm explaining there how to get the active slide index. Thanks ✌️
@pascalkollie4216
@pascalkollie4216 2 жыл бұрын
If you want to change the color of the tab with a swipe you can do this const Indicator = ({ measures, scrollX, dataValues }) => { const inputRange = dataValues.map((_, i) => i * width) const IndicatorWidth = scrollX.interpolate({ inputRange, outputRange: measures.map((measure) => measure._width) }) const translateX = scrollX.interpolate({ inputRange, outputRange: measures.map((measure) => measure.x) }) const colors = scrollX.interpolate({ inputRange, outputRange: ["gray", "red", "blue"] }) return }
@securityguy8353
@securityguy8353 2 жыл бұрын
Is that possible to add pages instead of images
@AhmedAb96
@AhmedAb96 3 жыл бұрын
Thank you so much. If u can make a video about how to make coustom tabBar animated with react-navigation 5 please. I wish u the the best .
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Great suggestion. Thanks Ahmed ✌️
@MrZlep
@MrZlep 3 жыл бұрын
Thank you very much. This is awesome. However, I'm really struggling to understand inputRange and outputRange. Could you please do a tutorial on these two things or maybe explain it a little bit more in your next video? And then there is one more thing I don't understand. What does "ref?.current?." at 21:05 mean? Especially the question mark? Thank you very much in advance.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Hi MrZlep, great topic suggestion, I’ll think about creating a video explaining interpolation input and output ranges. About the question mark, it’s called optional chaining (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) and is checking if the left hand side exists otherwise returns undefined. Eg: if(obj && obj.key && obj.key.subKey) Can be translated to obj?.key?.subKey Thanks ✌️
@MrZlep
@MrZlep 3 жыл бұрын
@@CatalinMironDev Thank you very much. You're awesome. Love your RN tutorials. Keep going, you will add a lot of followers in the future.
@angNguyen-cg8gk
@angNguyen-cg8gk 2 жыл бұрын
is there any npm package like this ?
@jonathanmachado4008
@jonathanmachado4008 3 жыл бұрын
Hi, Catalin thanks for the video. I have one bug here. My measurement is done before render and when I start my app indicator never shows up because measurements are always zero (x, y, width and height are zero). Do you have any idea how to solve that?
@NgocNguyen-re3gm
@NgocNguyen-re3gm Жыл бұрын
same here -_- he didn't reload the entire app
@priyashah1693
@priyashah1693 3 жыл бұрын
Hey , Firstly u r videos are awesome. Currently I was doing this example but I was not load array 'M' and useEffect is also not getting called.I'm talking about 15:15 Tabs useEffect. If you can help, that will be great.
@shafqatullah6666
@shafqatullah6666 2 жыл бұрын
same here.. cant u help me if u found any solution?
@vvssangeeth
@vvssangeeth 3 жыл бұрын
Can you create uber eats list view animation after this ? This is an excellent tutorial. Thanks for that. Uber eats is also built in RN.
@CatalinMironDev
@CatalinMironDev 3 жыл бұрын
Could you please record the screen and share the video with me? Great suggestion! Thanks Sangeeth ✌️
@vvssangeeth
@vvssangeeth 3 жыл бұрын
@@CatalinMironDev drive.google.com/file/d/1h_m4OC107X7xuvrLRK19W46bJqEFfSQr/view?usp=drivesdk Please find the video in above drive link. Let me know if you need anything else. Thanks for the quick response. Highly appreciated.
@smilecat9623
@smilecat9623 3 жыл бұрын
@@CatalinMironDev please can we do this animation with three different components. Thanks
@iblisalaleab4241
@iblisalaleab4241 2 жыл бұрын
Hi, really like your videos. This is awesome. However, I'm really struggling with this error TypeError: _ref$current.scrollToOffset is not a function. (In' _ref$current.scrollToOffset({ offset: itemIndex * width, })','_ref$current.scrollToOffset' is undefined ). Thank you very much in advance.
ПЕЙ МОЛОКО КАК ФОКУСНИК
00:37
Masomka
Рет қаралды 10 МЛН
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Рет қаралды 46 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 119 МЛН
La final estuvo difícil
00:34
Juan De Dios Pantoja
Рет қаралды 26 МЛН
React Native IDE BETA 🔥
15:55
Simon Grimm
Рет қаралды 26 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 143 М.
React Native Scroll Item animation effect - FlatList and Animated API
17:06
Watch This If You Want To Make Games
8:29
Thomas Brush
Рет қаралды 9 М.
Advanced React Native FlatList animations at 60fps with Animated API
20:11
Improving Tap Gestures in React Native
16:39
Reactiive
Рет қаралды 3,3 М.
ПЕЙ МОЛОКО КАК ФОКУСНИК
00:37
Masomka
Рет қаралды 10 МЛН