Swipe effect in react js

后端 未结 3 741
栀梦
栀梦 2020-12-24 08:35

I\'m trying to create a swipe event using React. I do not want to use any external component or jquery.

The css is something like :

.outter{
  posit         


        
3条回答
  •  北荒
    北荒 (楼主)
    2020-12-24 08:42

    Just found a DOM event that could be useful. Add .ontouchend to your HTML tag to detect any swipe event originating from that tag.

    https://www.w3schools.com/jsref/event_touchend.asp - ref

提交回复
热议问题