Spotify Scrollable Header - “Can it be done in React Native?”

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ส.ค. 2024
  • In this video, we are looking at the Spotify scrollable header. I hope that you will enjoy the video! 😀 Let me know what you think.
    Wanna learn the fundamentals of Gesture Handler and Reanimated? Check out my online course at start-react-native.dev.
    The full example is available at snack.expo.io/@git/github.com...
    You can check it out on GitHub as well at github.com/wcandillon/can-it-...
    I mentioned a React Native bug in the video, here is the link: github.com/facebook/react-nat...
    The boilerplate project if you want to follow along with the example is available at bit.ly/2IhtVjx
    Want to build your best app yet? Check out react-native.shop/elements.
    Do you like the series? You can support the channel by buying me a coffee at react-native.shop/buy-me-a-co... ☕️.
    Are you sometimes asking yourself "Can it be done in React Native"? Send me your suggestions at wcandillon@gmail.com
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @matheusvictor9629
    @matheusvictor9629 4 ปีที่แล้ว +9

    When I'm thinking about building some cool animations first thing I think about is "better check if William did it already", so I can get good code and understand it hahah
    Thanks man!

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

    I really love your lectures. Thanks william for producing awesome content.

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

    Awesome. You make animated seem very easy to use.

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

    This's really amazing video about react native. Thank you so much!!! ❤️❤️❤️❤️

  • @erictruong5342
    @erictruong5342 5 ปีที่แล้ว +1

    Awesome video William !!! I have learned so much from you. Thousand thanks to you!

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว +1

      You are definitely most welcomed :)

  • @harshrajkamble
    @harshrajkamble 5 ปีที่แล้ว +2

    Woooohoooo ! One more great thing to explore !

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

    This video is really helpful, thank you so much

  • @kemy0x0
    @kemy0x0 5 ปีที่แล้ว +1

    Awesome as always 🎉 Thank you so much!

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

    Congrats on the great content! Keep it up

  • @selwak
    @selwak 5 ปีที่แล้ว +1

    Great as always. Thank You!

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      Woah thank you :)

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

    Finding exactly what you want on the internet is truly a blessing omg

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

    This make so much sense and like the video so much and can understand it

  • @SalmanNova
    @SalmanNova 5 ปีที่แล้ว +1

    Amazing, left a like and subscribe!

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

    Thank you so much for helping us out 😊

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

      You are most definitely welcome :)

  • @jjysoserious
    @jjysoserious 5 ปีที่แล้ว +2

    Wow, you motivate me so much to get better thanks!

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      I get this feeling sometimes watching TH-cam :) Thanks man, really appreciate!

  • @manintheglass
    @manintheglass 5 ปีที่แล้ว +4

    Amazing video! As a beginner with animations I was hoping you were going to explain some of the decisions you made, like why you use 'extrapolateRight' instead of just 'extrapolate' for example. I know that I can read the docs, but it also helps a lot to hear someone explain WHY they chose X vs. Y. Basically, I think it'd be super helpful if you explained more of what's going on in your head (which I know can be difficult). Do you have other videos where you explain the basics of the reanimated library?

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว +2

      true :) in this particular case, I was just trying to be fancy, interpolate will work fine. I'm also working on a reanimated course.

  • @4You190
    @4You190 3 ปีที่แล้ว

    Very interesting and great series 👍🏼👍🏼👍🏼👍🏼

  • @hitmobi
    @hitmobi 2 ปีที่แล้ว +1

    I really like your videos. I do have a question about sizing elements. I can see that in most of your videos you use constants for your item sizes. Is that a common way to handle layout dimensions in react-native? I guess what i'm asking is how would you handle different phone screen-sizes. Would you have a size modifier which is calculated by the real screen dimensions or is the difference negligible in the context of screen size difference and still looks OK in most phones?

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

    wow just found your video today. I hope could learn react from here

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

      Lmao this is not the place is to learn react for beginners I'm just like you.. and he doesnt seem to care for the beginners.. this is for advance students not me and you.

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

    Will the onEndReached() of the flatlist be called if Flatlist is used in this example?

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

    Can you explain why in the interpolate of the cover you go from a negative y value?

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

    Hi William,
    just a question
    If you a similar scrolling
    for example
    I have tabs from native base that is under the header which is collapsible
    let's say the header max is 300 and when its collapsed, it will be 200 for example.
    What I want is I want to disable scroll view of the tabs till I reach a certain point then I am allowed to scroll the inner scroll view
    hope you get my point, i have been looking to fix this for a while now but I have no clue
    I tried, scrollEnabled={false} on the inner scroll view and it worked but there is no way to switch back to true and allow it to scroll then If the user wants drag the scroll view back he can.
    Can you give me an idea on how to fix such a thing.
    A good example would, open table app
    Regards

  • @sontrungly1367
    @sontrungly1367 5 ปีที่แล้ว +1

    we love you man

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      And I love you guys too ☺️

  • @TheWicar
    @TheWicar 2 ปีที่แล้ว +1

    Would you still do that way? Or do you have new pespectives?
    Thank you!
    Your contente is awesome!

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

    What if the album cover is a carousel? how would you get the swipe left/right happening on carousel when it's underneath the Animated.ScrollView? Many Thanks

  • @AbdulRahman-nk5kq
    @AbdulRahman-nk5kq 4 ปีที่แล้ว +1

    Hi William, I'm from chennai, India. I love your videos. It is very helpful. Could you please do a video recreating Google Play profile scrollview animation.

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

    Does anyone have an example of doing this with reanimated 2?

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

    Amazing

  • @user-wp1ie9rl9s
    @user-wp1ie9rl9s 4 ปีที่แล้ว

    Nice one. I was able to do the same with ScrollView but I got stuck implementing in with FlatList. There's no such component like Animated.FlatList 🤔

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

    Cool video

  • @N96123
    @N96123 5 ปีที่แล้ว +4

    I love your videos. Do you have any courses about animation and ux in react native ?

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว +5

      I'm working on it :) Thank you for your patience 🙏🏻

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      I have one at start-react-native.dev

  • @tonig6396
    @tonig6396 5 ปีที่แล้ว

    Is there any problem if I want to animate/scale something which is inside the scrollable while you scroll?

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

    Great work. Does this work on andriod too

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

    its RN version 0.61.5 and i think the shuffle play lag you mentioned in 26:00 still persists on both platforms. In this example however it is pretty difficult to spot the delay in the animation, although your work around probably works great. Im about to try and implement it in my case of use.

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

      work around works perfectly! great tutorial! liked + sub

  • @user-vi3qe4td2p
    @user-vi3qe4td2p 2 ปีที่แล้ว

    Hi William, it's really good! i have a challenge! how to implement sticky header with tabs ? like instagram profile. thanks!

  • @maxiiime
    @maxiiime 5 ปีที่แล้ว +1

    Could you explain the extrapolateRight on the scale interpolation of the image? why not just extrapolate?

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว +1

      We don't want to add a limit on how large the image could get by scrolling up, but when scrolling down, it needs to not go lower than 1. Of course a plain extrapolate would work too since it's impossible to scroll up that much on iOS

  • @JamalUdDin-p6k
    @JamalUdDin-p6k หลายเดือนก่อน

    Implementation with the tabbar component instead of scrollview

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

    7:45 Sorry I am new to react native, is that 'SDK 43' or something else?

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

    amazing...

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

      Haha thanks man :)

  • @terrysahaidak
    @terrysahaidak 5 ปีที่แล้ว +1

    Really great work! Love your channel.
    I would use stickyHeaderIndices prop of ScrollView for shuffle button though. In my mind right now it makes more sense (haven't tried it yet with that example, but have done something similar already).

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว +1

      Thanks a lot! I'll look into it and update the example. Will it work since the small header layer is in between the button and the scrollable content? I'll check

    • @terrysahaidak
      @terrysahaidak 5 ปีที่แล้ว

      @@wcandillon If you'll move it from Header and place in between of the song list and header, it should, since it will be upper than the header, so it will have bigger zIndex. So the index of that view will be `1` and it should just work.

    • @terrysahaidak
      @terrysahaidak 5 ปีที่แล้ว +1

      @@wcandillon Here is my version, check it out (not perfect, though, but might give you some inspiration) :)
      github.com/wcandillon/can-it-be-done-in-react-native/compare/master...terrysahaidak:tr-fix-spotify-sticky-header
      (some of the changes are slightly random, didn't have enough time to get into your code properly)

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      @@terrysahaidak Looks amazing thks! Reviewing the changes now. You rock ;-)

    • @terrysahaidak
      @terrysahaidak 5 ปีที่แล้ว +1

      @@wcandillon Your feedback would be appreciated :)

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

    Unfortunately the example on expo could not be loaded

  • @PlayerHeader
    @PlayerHeader 5 ปีที่แล้ว +9

    I love your videos! You look like Johnny Sins

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว +1

      Haha thks I guess 😅

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

      😅😅

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

      Haha

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

      hahha Johnny sins with another job :D

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

    Is it not possible to do this in React Native CLI? :(

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

    Is onScroll function available on "react-native-redash": 3.3.2 because on version 14 I’m encountering bugs

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

      onScrollEvent should be used

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

      Have you find how to resolve it ?

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

    i love to purchase your course, but do have tutorial for js, because im not familiar with typescript

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

      I do address this topic at start-react-native.dev/lessons/development-setup. If you think that it will be fine, send me an email at wcandillon@gmail.com and I will send you a discount code.

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

    Hi there! I am trying to implement the animation. But I get an error: undefined is not a function (near '...proc...') when importing onScroll from 'react-native-redash'. Can't find any related issues. Any ideas?

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

      importing like this: import { onScrollEvent } from "react-native-redash/lib/module/v1"

  • @johnniefujita
    @johnniefujita 5 ปีที่แล้ว +1

    i noticed that react is pretty much transitioning to using just functional components. Or something like this. Is that right so? and where can i give a deep dive on it, to gradually update my old components and uis that are already in production? thanks man! and keep up the good work, you are awesom!

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      Absolutely you should look into hooks:
      th-cam.com/video/dpw9EHDh2bM/w-d-xo.html
      reactjs.org/docs/hooks-intro.html
      There is a high barrier to entry (similar to reanimated :)) but once you're into it, they are great :))

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

    I have a basic question, what is difference of .js and .tsx? And can I use .js instead of tsx without changing any codes?

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

      yes but you would have to remove the type annotations. I have a video on this topic at start-react-native.dev/lessons/development-setup I hope this helps!

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

      @@wcandillon thank you! Yea this helps. I email you a suggestion for you next series! I hope you confirm it!

  • @ArmandoSosa
    @ArmandoSosa 5 ปีที่แล้ว +1

    I love your videos and I think I've learned a lot of animations. But I struggle on how to make animation respond to property changes. Like a property `active` changes from `false` to `true` and have animation tied to that 😭I have found zero examples on reanimated on how to do such things.
    Btw, your coffee page keeps rejecting my mexican card :( You should add a Paypal button too.

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      I agree that these are hard to do. I need to try the new Transition API from reanimated, it might help with that. Do you have an example based on a real-world app? I might do it on the channel.

    • @ArmandoSosa
      @ArmandoSosa 5 ปีที่แล้ว

      @@wcandillon I have tons, but they are on a my bosses stealth and unreleased app XD. I think I'll do one of those Dribble UI exploration animations.

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

    i love react , we are same religion :D

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

    SO from Zürich

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

    14:24 i'm weak at math could please tell me.. whats going on..

  • @anastely6144
    @anastely6144 5 ปีที่แล้ว +5

    Great work William, Can you make some episode with JavaScript, not typescript?

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว +1

      But this is JavaScript (it runs through babel) + type annotations. Without the types animations, it is pure JavaScript. Why would you like to see vanilla JS?

    • @anastely6144
      @anastely6144 5 ปีที่แล้ว

      Hmm, I just see the file extension as a " .tsx " so it's weird to me, so that's it :/

  • @nevaknowmanamesame5089
    @nevaknowmanamesame5089 5 ปีที่แล้ว +1

    On ios it's easy peasy, but what about Android?

    • @wcandillon
      @wcandillon  5 ปีที่แล้ว

      In this particular episode, it was the opposite (which is rare): easy peasy on Android, hard on iOS

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

    Will Flutter kill React Native? because React Native not have exlusive support like Flutter

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

    will we ever find out if a soviet nuclear power plant can be done in React Native...

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

    Why Typescript ? Please use JavaScript

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

    Tu n’es pas français ? 😅

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

      sisi francais qui vit à Zürich 🙋🏼‍♂️

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

    I think this is for advanced react native stidents not beginners at all. Thank you for wasting my time.

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

      not his problem that you aren't smart enough 🤷‍♂