Advanced React Native Animated FlatList Picker - Synchronised FlatLists

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ส.ค. 2024
  • In this tutorial I'm going to teach you how to synchronise two different FlatList and how to create a picker animation in React Native. This is a performant react native FlatList animation that will work on both iOS and Android at 60fps and there's no need for a Masked View to create this type of animation.
    You can use this picker when doing a react native social auth screen.
    👉Join Discord: / discord .
    I'll walk you through:
    - How to synchronise two FlatLists
    - How to get the selected item from a FlatList using onMomentumScrollEnd event
    - How to create the Masked effect using two different FlatLists
    Inspiration: dribbble.com/shots/3431451-HU...
    GitHub: github.com/catalinmiron/react...
    👉👉👉 More react native animations: www.animatereactnative.com/ 👈👈👈
    ----
    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 Intro
    01:05 Project boilerplate
    02:35 How an Item looks like
    03:32 Create the reusable FlatList component
    05:30 React.forwardRef for FlatList component
    07:00 First FlatList component
    08:02 Second FlatList component (the masked view style)
    10:02 Synchronise the two FlatLists
    12:05 Sync the second FlatList based on scrollY value
    14:00 Get the active slide index onMomentumScrollEnd
    15:59 Final words and thank you so much
    #reactnative #flatlist #picker #animation #sync-2-flatlist #react-native-social-auth #react-native-masked-view #react-native-picker-flatlist

ความคิดเห็น • 94

  • @HotShotAjKtm
    @HotShotAjKtm 4 ปีที่แล้ว +2

    Thank you for taking the time to make these tutorials. I have learned a lot from your videos.

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      My pleasure and I'm glad you find them useful. Thanks Tandav ✌️

  • @sweetwarmblanket
    @sweetwarmblanket 4 ปีที่แล้ว

    I'm glad to have found your channel. Ever since I saw your birthday candle ruler video, I'm learning and focusing more on RN Animation and the power of it. I wish I had found it earlier but it's never too late. Cheers

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      Wonderful! Thank you so much! I'm glad that I can help you in any ways possible. Looking forward to seeing what you're building. Thanks R! ✌️

    • @sweetwarmblanket
      @sweetwarmblanket 4 ปีที่แล้ว

      @@CatalinMironDev Could you do a video on animated splash screen in react native using GIF?

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว +1

      I can give it a try 👍

  • @AbhishekVerma-fe3wo
    @AbhishekVerma-fe3wo 2 ปีที่แล้ว

    best react native channel for creative animation

  • @AshwinMothilal
    @AshwinMothilal 4 ปีที่แล้ว

    You made it so simple man. Great video 🎉

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      I'm glad you find this video useful and easy to follow. Thanks Ashwin!✌️

  • @PierreTeyssedre
    @PierreTeyssedre 4 ปีที่แล้ว

    Thanks for the tutorial. Awesome content as usual!

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      Thanks Pierre, I’m glad you liked this video as well ✌️🤗

  • @kenpham5557
    @kenpham5557 3 ปีที่แล้ว

    You are AMAZING Catalin. You inspired me. Thank you so much. Keep it up.

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว +1

      I’m blessed 😇. Thanks a lot Ken! ✌️

  • @totaltotal157
    @totaltotal157 4 ปีที่แล้ว

    Another impressive animation. Amazing!

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      Thanks a ton! I'm glad you liked it. Thanks ✌️

  • @MohamadKh75
    @MohamadKh75 4 ปีที่แล้ว

    Great! 👌🏻
    Searched a lot about this

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      Thank Mohamad I'm glad you found what you need. Thanks ✌️🤗

  • @youssefmuhamad3213
    @youssefmuhamad3213 4 ปีที่แล้ว

    Awesome tutorial! You're helping me a lot.

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      Glad to help! Thanks Youssef! ✌️

  • @manilmalla1911
    @manilmalla1911 3 ปีที่แล้ว

    Thank you so very much for this informative video.

  • @akbarsheikh5690
    @akbarsheikh5690 3 ปีที่แล้ว

    It was amazing amazing and beautiful .....Love to see more videos.

  • @mehankjain4425
    @mehankjain4425 4 ปีที่แล้ว +1

    Very nice and easy to understand ☺️ tutorial keep it up 👍🏻

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      I'm glad this was easy to follow. Thanks Mehank ✌️

  • @youtubehelge5049
    @youtubehelge5049 4 ปีที่แล้ว

    Amazing content as always 😃 Thank you very much.

  • @arevy
    @arevy 3 ปีที่แล้ว

    E ok asa :)) chiar e misto, big up

  • @surajrao97
    @surajrao97 3 ปีที่แล้ว

    You are awesome. Thank you for this tutorial.

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      Glad it was helpful! Thanks Suraj! ✌️

  • @elhelalyQ
    @elhelalyQ 4 ปีที่แล้ว

    As usual a new amazing video

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      Thank Muhammad, I'm glad that you liked it! ✌️

  • @aazamheidari4689
    @aazamheidari4689 3 ปีที่แล้ว

    Thank you so much.I learn a lot .

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      Glad to hear that. Peace Aazam ✌️

  • @mulwelimushiana8388
    @mulwelimushiana8388 4 ปีที่แล้ว +6

    Yes please, Thank you for changing to dark theme man

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      I'm glad you liked it. Thanks Proff! ✌️

  • @faizanansari975
    @faizanansari975 3 ปีที่แล้ว

    Awesome Buddy

  • @sandeshbirwadkar2384
    @sandeshbirwadkar2384 4 ปีที่แล้ว

    Great tutorials!

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      Thank you Sandesh! There's more to come ✌️

  • @learnandlearn849
    @learnandlearn849 4 ปีที่แล้ว

    Nice animated flatlist, plz provide more tutorials for Animation

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      I'm doing my best to provide as many animation tutorials as possible. Thanks! ✌️

  • @dothuan6630
    @dothuan6630 4 ปีที่แล้ว

    you help me solve my problem. Thanks!

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      do thuan this is amazing, that’s the main reason I’m creating this tutorials. Thanks a lot and I’m glad I can help you!

  • @user-te4gn9yq5c
    @user-te4gn9yq5c 9 หลายเดือนก่อน

    that's so cool

  • @nischayasharma3841
    @nischayasharma3841 3 ปีที่แล้ว +1

    Can you share your VS Code settings. It looks super awesome man

  • @vipinrawat4222
    @vipinrawat4222 3 ปีที่แล้ว

    You gem man 🙌🏼

  • @_acixxx
    @_acixxx 4 ปีที่แล้ว

    amazing!

  • @Jefferson4026
    @Jefferson4026 4 ปีที่แล้ว +1

    You are amazing

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      You're amazing too Jefferson! Thanks ✌️

  • @furkanturkylmaz8385
    @furkanturkylmaz8385 4 ปีที่แล้ว

    Perfect

  • @shriganeshholebagil631
    @shriganeshholebagil631 3 ปีที่แล้ว

    That was a great video man and thank you for changing to a dark theme😂. By the way which font family are you using in VS Code?

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว +2

      The font is called Operator Mono and the theme is Palenight marketplace.visualstudio.com/items?itemName=whizkydee.material-palenight-theme. Thanks Shriganesh ✌️

    • @shriganeshholebagil631
      @shriganeshholebagil631 3 ปีที่แล้ว

      @@CatalinMironDev Thank you🙂

  • @notjustadulting705
    @notjustadulting705 2 ปีที่แล้ว

    Hi Catalin, I'm facing a weird issue while implementing this. The moment I remove showtext from the first list, the lists stops overlapping. Not able to figure out why.

  • @dev_front980
    @dev_front980 4 ปีที่แล้ว

    Muito top

  • @fidelendzime6733
    @fidelendzime6733 ปีที่แล้ว

    Hello Guy. I hope you're doing well. can't find the css at the beginning of the video

  • @RohitSingh-ml2bz
    @RohitSingh-ml2bz 3 ปีที่แล้ว +1

    Hey Catalin how are you dear? I have a request to you, can you please make a tutorial on instgram stories animation in your style, actually your teaching style is impressive.

  • @MateoHrastnik
    @MateoHrastnik 4 ปีที่แล้ว

    You don’t have to use forwardRef. You can pass the ref directly to the FlatList. You only have to use forwardRef when you extract the FlatList to a separate component.

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว +3

      This is what I did, I extracted the FlatList into a component (the only difference is that it was in the same files). Thanks 🙏

  • @MerciBro
    @MerciBro 3 ปีที่แล้ว

    So why did you use React.memos?

  • @thelocpham6427
    @thelocpham6427 4 ปีที่แล้ว

    How do you set up the font for VS Code? Which font are you using?

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      Hi,
      Font: Operator Mono
      Theme: Palenight - marketplace.visualstudio.com/items?itemName=whizkydee.material-palenight-theme
      Thanks ✌️

  • @rohithpatel5306
    @rohithpatel5306 3 ปีที่แล้ว

    hi sir , can you make a video on react native TV (android TV) : (IOS TV) ? because of focusing the each element in flatList separately . Please ....

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      Hi Rohith, I haven't played around with TV OS so far so I don't have a clear answer to give. Thanks!

  • @godswillokokon8586
    @godswillokokon8586 3 ปีที่แล้ว

    Love your theme, Please what's the name and your font looks awesome too!

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      Hi,
      Font: Operator Mono
      Theme: Palenight - marketplace.visualstudio.com/items?itemName=whizkydee.material-palenight-theme
      Thanks ✌️

  • @rohithpatel5306
    @rohithpatel5306 3 ปีที่แล้ว

    can we change style from onPress or onFocus fuctions?

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      You can try to setState isFocused for onFocus and apply a different style to the view based on the isFocused flag. Thanks Rohith!

  • @028-manikandan3
    @028-manikandan3 ปีที่แล้ว

    You put reactnative with typescript projects bro please

  • @mohdsajidshaikh4291
    @mohdsajidshaikh4291 4 ปีที่แล้ว +2

    Hey,
    Please make video on basics of reAnimated

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +7

      I'm working on a course about Reanimated2. I'll keep you posted once this is available. Thanks Muhammed! ✌️

    • @mohdsajidshaikh4291
      @mohdsajidshaikh4291 4 ปีที่แล้ว +1

      @@CatalinMironDev Thanks.
      Awaited for that please explain in deep there are more stuffs in reAnimated

  • @russellthompson5181
    @russellthompson5181 3 ปีที่แล้ว

    The dark theme is easier to read. Please stick with the dark theme. Also, this is a great video. I really like the effect, thanks for sharing.

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      Thanks Russel, I’m going to stick with it for now. I’m glad you liked it. Peace ✌️

  • @RohitSingh-ml2bz
    @RohitSingh-ml2bz 4 ปีที่แล้ว

    You are a good teacher. You make difficult things easier. Thank you
    BTW white background in VS Code was better.

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว

      You are welcome and thanks for commenting about the VSCode theme. I'm also a big fan of light themes. Thanks Rohit! ✌️

  • @fatehfarooqui3587
    @fatehfarooqui3587 4 ปีที่แล้ว

    Great content... I don't know if it has been asked before? Are you planning to create a udemy course? It would be awesome.

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      Working on it! I'm building a course hosted on my own platform/website. Thanks a lot for showing your interest Fateh!

    • @fatehfarooqui3587
      @fatehfarooqui3587 4 ปีที่แล้ว

      @@CatalinMironDev Great🔥

    • @sebmonti5904
      @sebmonti5904 ปีที่แล้ว

      Any update on any courses ?

  • @MateoHrastnik
    @MateoHrastnik 4 ปีที่แล้ว

    Question: Doesn’t this approach depend on the scroll event throttle? Doesn’t the onScroll method get called asyncronously?
    If you used an Animated FlatList and animated its transformY with the Y offset of the scrollable one, you could get the same effect and keep it all native.
    Also I think you could also do this by having only one FlatList in the background and overlaying it with some Views to hide the non-selected icons. But, I understand the point was to demonstrate syncing 2 FlatLists so it's all cool.
    Ps. Great work! I love your videos and crazy animation ideas. Cant wait for the next one!

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว

      Thanks Mateo. onScroll event (I might be wrong) but it is async but coming at 1000/16ms (60fps). I’m not sure about the usage with a single FlatList but you can give it a try and share the code. Thanks for showing your support and feedback, it means a lot to me. Thanks Mateo ✌️

    • @MateoHrastnik
      @MateoHrastnik 3 ปีที่แล้ว +1

      @@CatalinMironDev Here's the implementation with a single FlatList and some Views. Sorry for the messy code... I hope it's not too convoluted. snack.expo.io/TZWpQ0b_I

  • @zashifrovano388
    @zashifrovano388 3 ปีที่แล้ว

    Why do you use:
    1. scrollY = createRef for animated value (??? what), instead of just scrollY = Animated.value() ????
    2. why do you use 'useCallback' with just onPress FOR simple button?

    • @CatalinMironDev
      @CatalinMironDev  3 ปีที่แล้ว +1

      In the latest videos I’m saying why I’m using useRef. Basically this is because whenever the component is re-renders or receives new props the value of scrollY is not going to change. Thanks ✌️

    • @zashifrovano388
      @zashifrovano388 3 ปีที่แล้ว

      @@CatalinMironDev i thought in new react it's not necessary because of optimizations... also FC isn't 'render()' function like in class. So, I ask question because of that. Hmm.... Maybe I should do some tests and read documentation again. Thanks

    • @zashifrovano388
      @zashifrovano388 3 ปีที่แล้ว

      ​@@CatalinMironDev useCallback for onPress the same. I thought there is no new instance creation but just 'you are already declared, okay do nothing' in optimization.
      hmm anyway thanks. awesome videos.

  • @cdchris825
    @cdchris825 4 ปีที่แล้ว

    That's awesome, can you tell me how I can make money with react native?

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      Nowadays there are multiple companies that are looking for React Native developers so you can apply for one of their positions. To be honest I don't have a magic formula but if you are able to build couple of applications and grow your portfolio you can start making money as well by being hired by a company. Thanks!

    • @RubenGarcia-mr7pe
      @RubenGarcia-mr7pe 4 ปีที่แล้ว

      @@CatalinMironDev this is good advise

  • @GoeHybrid
    @GoeHybrid 4 ปีที่แล้ว

    How do you even learn all this stuff? React-native's docs are full of shit.

    • @CatalinMironDev
      @CatalinMironDev  4 ปีที่แล้ว +1

      Haha thanks Goe! I’m one of the early React Native adopters and had access to it in the private mode and I was building apps and animations since then. Only hard work and passion I think that got me where I am now. If you need any help or you want me to tackle any subject, feel free to share it with me. Thanks a lot ✌️

    • @GoeHybrid
      @GoeHybrid 4 ปีที่แล้ว

      @@CatalinMironDev You are too nice :)