We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use react-swipeable - 1 common examples

To help you get started, we’ve selected a few react-swipeable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jxnblk / mdx-deck / packages / gatsby-theme / src / hooks / use-swipe.js View on Github external
next(context)
  }

  const onSwipedRight = e => {
    previous(context)
  }

  const onSwipedUp = e => {
    context.setState({ mode: modes.presenter })
  }

  const onSwipedDown = e => {
    context.setState({ mode: modes.normal })
  }

  const props = useSwipeable({
    onSwipedLeft,
    onSwipedRight,
    onSwipedUp,
    onSwipedDown,
  })

  return props
}

react-swipeable

React Swipe event handler hook

MIT
Latest version published 1 year ago

Package Health Score

77 / 100
Full package analysis

Popular react-swipeable functions