Releases: FormidableLabs/react-swipeable
Releases · FormidableLabs/react-swipeable
v5.4.0
v5.3.0
5.3.0
- Optimization for
useSwipeablehook. AddeduseMemofor handler internals issue #134 and PR #149- Thank you @FaberVitale!
v5.2.0
5.2.0
- Fix bug where callbacks/props were not refreshed for
useSwipeableand<Swipeable>, issue #136 and PR #138- Thank you @caesarsol and @bas-l!
- Add typescript types for
useSwipeableand<Swipeable>, issue #125- Thank you @adambowles!
v5.1.0
- Fix for
preventDefaultTouchmoveEventin safari issue #127 and PR #131- Thank you @JiiB and @bhj!
- use
refcallback for both<Swipeable>anduseSwipeableto attach all touch event handlersuseSwipeable's returnedhandlersnow contains a ref callback- Please see disscusion and comments in both #127 and #131 for more details and info.
- fix avoids the
passive: trueissue from chrome document event listeners - fix avoids bug on safari where the
touchmoveevent listener needs to be attached before atouchstartin order to be able to calle.preventDefault
- fix avoids the
- removed
touchHandlerOptionprop- fix above deprecates this prop
v5.0.0
- Introduce react hook,
useSwipeable - Core rewrite to simplify api and trim down bundled size
- Add
size-limitto help keep bundled size down - Add
esexport via"module": "es/index.js"topackage.json - Add
prettiercode formating - [BREAKING] simplify handler event data to allow destructuring
onSwiped = ({ event, direction, absX, absY, velocity}) => console.log('swiped')
- [BREAKING] deprecated
onSwiping{Left|Right|Up|Down}handler props- can be replaced with direction/
direvent data onSwiping = ({ dir }) => console.log(`swiping - ${dir}`)
- can be replaced with direction/
- [BREAKING] deprecated props
flickThresholdstopPropagationdisabled
v4.3.0
- Add
rotationAngleprop. #103- will allow to set a rotation angle, e.g. for a four-player game on a tablet, where each player has a 90° turned view.
- Thank you @Narquadah and @LarsKumbier!