Animated Swipe Button - Reanimated v2 | React Native Tutorial ⚛️

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

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

  • @김건희-z2s
    @김건희-z2s Год назад +1

    hi. youre code doesn't work anymore... please update your code??

    • @FuncsIO
      @FuncsIO  Год назад

      Thanks for highlighting this. Taking a deeper look at it and will try to fix it if required

  • @lorran-xo
    @lorran-xo 2 года назад +5

    For those who Swipe Button is not working, import GestureHandlerRootView from react-native-gesture-handler and wrap SwipeButton on it, worked for me.
    import {GestureHandlerRootView} from 'react-native-gesture-handler';

  • @anandthakur4620
    @anandthakur4620 3 года назад +2

    My slider is not working can you please give me solutions

    • @lorran-xo
      @lorran-xo 2 года назад +2

      Import GestureHandlerRootView from react-native-gesture-handler and wrap SwipeButton with it, worked for me.
      import {GestureHandlerRootView} from 'react-native-gesture-handler';

    • @mad-mak
      @mad-mak 2 года назад +1

      @@lorran-xo dude!!!! i can't thank you enough

  • @dineshm2757
    @dineshm2757 2 года назад +2

    dude - you should do more videos, your style of teaching is actually far better than the good guys. restart uploading videos. will be worth your time and help others too.

  • @gokulmano7024
    @gokulmano7024 Год назад +1

    need video for swipe button for react pwa

  • @SalahDev-wz8ob
    @SalahDev-wz8ob Год назад +1

    bro, u nailed it well done, just i'm having an issue where I'm using expo, the problem is the code works perfectly with ios, but it doesn't with Android

  • @RenalTutor
    @RenalTutor 2 года назад +1

    cannot gesture

  • @feritejakusuma8450
    @feritejakusuma8450 3 года назад +2

    Thanks for the video ,👍👍👍

  • @mohdsajidshaikh4291
    @mohdsajidshaikh4291 3 года назад +1

    Pls make a video how to make floating overlay component in other apps using RN

  • @JimitShah-ec9ph
    @JimitShah-ec9ph Год назад +1

    Bro great stuff, this really help me build similar component, but i want this button to be responsive as per the parent component, and from what i understand is we need to provide a number as width for this to render accordingly, any idea how can we make it responsive, thanks.
    I tried using Screenwidth but than will need to pass Screenwidth - somevalue from parent to this component

    • @FuncsIO
      @FuncsIO  Год назад

      Hey Jimit 👋
      Glad to hear that. If you want to make this responsive you can put all the values in React State and use this hook to update the computed value reactnative.dev/docs/usewindowdimensions

  • @surajtopal9940
    @surajtopal9940 Год назад +1

    amazing sir , thanks a lot

  • @oderflaj
    @oderflaj 2 года назад +1

    Thank you !!! I had to make some changes to implement in Snack: I had to add GestureHandlerRootView to wrap the main part of the PanGestureHandler and also I had to use import {LinearGradient} from 'expo-linear-gradient' instead of import LinearGradient from 'react-native-linear-gradient'

    • @FuncsIO
      @FuncsIO  Год назад

      Thanks for highlighting this, will make the same changes if required. Happy Hacking 🙌

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

    Getting error [Error: TransformError src\components\SwipeButton.js: D:\ReactNativeprojects\ezpoz\src\components\SwipeButton.js: Cannot find module '@babel/preset-typescript'. Please help me bro.Even i'm not using typeScript

  • @sagarramaswamy8368
    @sagarramaswamy8368 Год назад +1

    Thanks a lot 👍

  • @ehsankhorasani_
    @ehsankhorasani_ 3 года назад +1

    Awesome man

  • @AungMyintThein
    @AungMyintThein 3 года назад +1

    So cool!

  • @ShubhamSingh-gw9kq
    @ShubhamSingh-gw9kq Год назад

    Bro, my android phone flickers on runOnJS setToggle when used withTiming in place of withSpring, any soln for that?

    • @FuncsIO
      @FuncsIO  Год назад

      Oh, looks like you need to change some parameters here and there as withTiming takes different set of parameters to interpolate as compared to withSpring

  • @emclab5579
    @emclab5579 3 года назад +1

    Well done & thank you!

  • @vinhandev
    @vinhandev 8 месяцев назад

    tks for sharing

    • @FuncsIO
      @FuncsIO  8 месяцев назад

      Thanks for watching

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

    Hi, great tutorial. I had an issue... my swipeable doesn't move :( anyone can help?

    • @oderflaj
      @oderflaj 2 года назад +1

      try wrapping the View of the component with GestureHandlerRootView

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

    I got this issue when implementing your Swipe Button.
    TypeError: (0, _reactNativeReanimated.useSharedValue) is not a function. (In '(0, _reactNativeReanimated.useSharedValue)(0)', '(0, _reactNativeReanimated.useSharedValue)' is undefined)

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

      Seems like reanimated is not installed properly. Pls refer the docs for the changes required in the native side for the successful installation.

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

      @@FuncsIO same as me. im using expo and follow step for instalation. after that i cant run my project anymore. when i run the project the expo will force close. The Error said (TypeError: Object.values requires that input parameter not be null or undefined) whats the problem?

  • @jaysonhahn5881
    @jaysonhahn5881 Год назад +1

    Thank you!

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

    Maybe I am out of a topic, but does anyone know how is there any way to run the measure (reanimated 2) function in useEffect hook? That is bothering me for a few days. I already tried runOnJS function.

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

      Can you try useLayoutEffect instead of useEffect

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

      @@FuncsIO Tried, still getting error (measure) method cannot be used on RN side! :(

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

    thanks a lot

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

    totaly awesome!! loved it! I added a navigation on handleComplete() function but now I am not understanding how can I reset it to initial position once I come back to this screen. Can you please help me?

    • @meetsorathia2937
      @meetsorathia2937 Месяц назад

      Did you figured out?

    • @meetsorathia2937
      @meetsorathia2937 Месяц назад

      I found the way:
      // Fires when animation ends
      const handleComplete = (isToggled: any) => {
      if (isToggled !== toggled) {
      setToggled(isToggled);
      props?.onToggle();
      setTimeout(() => {
      X.value = withSpring(0);
      runOnJS(handleComplete)(false);
      setToggled(false);
      }, 1000);
      }
      };

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

    Great video, thanks a lot 👍

  • @all-in-all7862
    @all-in-all7862 3 года назад

    Good 👍. Can u create video like drag and short list and grid view using animation.

    • @all-in-all7862
      @all-in-all7862 3 года назад

      @@FuncsIO In Flatlist, list of images are there like list view and grid view I won't drag and short all images using Pangature animation.

  • @Jimmy-nh1cd
    @Jimmy-nh1cd 3 года назад

    Muy buen trabajo! :D

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

    Great work 👍

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

      Thanks for the positive feedback