Drag and Drop in React Native with PanResponder

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 41

  • @dennistennis5622
    @dennistennis5622 5 лет назад +11

    Nice to have you back and good that you enjoyed your holiday! 😀

  • @mrmuffyman
    @mrmuffyman 4 года назад +1

    Thanks for this tutorial dude. Listening to you explain it slows things down so I actually understand it instead of skimming through docs.

  • @HaiderAli-oi5fm
    @HaiderAli-oi5fm 2 года назад

    How are you able to show console logs in nice way in terminal at @11:05

  • @pavsoor
    @pavsoor 5 лет назад +1

    Great video, thank you! Can you explain the syntax used when you wrote Array(200)? I can't find that written anywhere - it's the first time I've come across something like it

    • @bawad
      @bawad  5 лет назад +3

      initializes the array with length 200

  • @fotios4902
    @fotios4902 4 года назад

    @13:48 Can someone explain what this is: Animated.event([{ y: this.point.y }])({ y: gestureState.moveY });
    I've seen code like this:
    1. If you're interested to the `evt`
    Animated.event([
    {
    nativeEvent: {
    contentOffset: {
    y: this._animation
    }
    }
    }
    ])
    2. If interested to `gestureState`.
    Animated.event([
    null,
    {
    dx: this._animation.x,
    dy: this._animation.y
    }
    ])
    So this
    `Animated.event([{ y: this.point.y }])({ y: gestureState.moveY });`
    is then probably an IIFE, and in the second (... ) Ben passes an object as a parameter.
    Right?
    But how does this work?
    And why he doesn't use null if the first place of the array, like in No 2?
    Thanks

    • @DryRotProjects
      @DryRotProjects 3 года назад

      Did you ever find a good explanation for this syntax? Looks like greek to me. I would love to understand whats happening.

    • @fotios4902
      @fotios4902 3 года назад

      @@DryRotProjects No, not yet bro... and I’m Greek 😄 Imagine that... 😂😂😂
      PS I know the expression. 😉

  • @failure232
    @failure232 4 года назад

    Dear Ben Award,
    Do you test you solution inside parent ScrollView?
    Thanks

  • @aashayamballi
    @aashayamballi 5 лет назад

    Heyyy welcome back Ben :)

  • @fr3fou
    @fr3fou 5 лет назад +9

    welcome back :)

  • @samerkayali4525
    @samerkayali4525 4 года назад +1

    have you done the other video?

    • @Smoked..Salmon.777
      @Smoked..Salmon.777 Месяц назад

      ruclips.net/video/huLpYZ207pc/видео.htmlsi=SlwmyJyLdq1eyYtv

  • @cuongduongmanh625
    @cuongduongmanh625 5 лет назад

    Can you share your RN settings in vscode (extension, config), such as a setting sync config file?

    • @bawad
      @bawad  5 лет назад +1

      gist.github.com/benawad/1e9dd01994f78489306fbfd6f7b01cd3

  • @MRBala-xx5si
    @MRBala-xx5si 2 года назад

    can you please tell me which editor is this?

  • @Viruhemanth
    @Viruhemanth 5 лет назад +1

    can we expect a series on react native reanimated?

    • @bawad
      @bawad  5 лет назад

      nope, I've never used reanimated

  • @pankajmundra7814
    @pankajmundra7814 3 года назад

    Hi Ben, awesome tutorial, but I a need help. Can you please show us how to do this coding in js instead of tsx.

    • @ricodane6847
      @ricodane6847 2 года назад

      hello, have you seen a solution for this on jsx?

  • @ben6
    @ben6 5 лет назад +3

    Continuation: ruclips.net/video/qeKP2A7bLUw/видео.html

    • @lebitube
      @lebitube 6 месяцев назад

      i know it's been 4 years already but thank you

  • @jexxiewoo8390
    @jexxiewoo8390 5 лет назад

    Ben is back:)

  • @johanvillamil2407
    @johanvillamil2407 5 лет назад

    why don't you use hooks?

    • @bawad
      @bawad  5 лет назад

      Implementing this with a class was simpler

    • @johanvillamil2407
      @johanvillamil2407 5 лет назад

      @@bawad But do you think that flatlist performance can be affected by hooks?

    • @bawad
      @bawad  5 лет назад

      no, I don't think it matters either way

  • @bantinggamer4962
    @bantinggamer4962 5 лет назад

    very very cool. thanks

  • @southredmondtoxik1885
    @southredmondtoxik1885 2 года назад

    Learning react native is very easy than setup it's environment 🥺😓

  • @edt723
    @edt723 5 лет назад

    I despise expo to the core. 🤬

    • @bawad
      @bawad  5 лет назад

      why

    • @edt723
      @edt723 5 лет назад +1

      @@bawad it's just a framework that wraps around another framework. So now its 3 levels of a mess that you have to deal with.
      I think it would be ok for simple small projects. Maybe even pure JS/TS project, but if you are doing anything with the hardware (GPS, camera, storage.. etc) or if the project is going to be big. Stay away from expo.
      I have really bad experience with it, I took over a project where the previous developer used expo, everything was broken, I spent 2 days trying to fix all the issues before I gave up. The funny thing is that I wasn't alone, I found all the issues on stackoverflow, github, and expo forums, there was always hacks, weird workarounds, and overall things not recommended. I ended spending 3 days stripping out expo and migrating everything to just pure React Native

    • @bawad
      @bawad  5 лет назад

      true if you have to do something that expo doesn't support, it gets messy