Releases: FormidableLabs/react-swipeable
Releases · FormidableLabs/react-swipeable
v5.4.0
v5.3.0
5.3.0
- Optimization for
useSwipeable
hook. AddeduseMemo
for 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
useSwipeable
and<Swipeable>
, issue #136 and PR #138- Thank you @caesarsol and @bas-l!
- Add typescript types for
useSwipeable
and<Swipeable>
, issue #125- Thank you @adambowles!
v5.1.0
- Fix for
preventDefaultTouchmoveEvent
in safari issue #127 and PR #131- Thank you @JiiB and @bhj!
- use
ref
callback for both<Swipeable>
anduseSwipeable
to attach all touch event handlersuseSwipeable
's returnedhandlers
now contains a ref callback- Please see disscusion and comments in both #127 and #131 for more details and info.
- fix avoids the
passive: true
issue from chrome document event listeners - fix avoids bug on safari where the
touchmove
event listener needs to be attached before atouchstart
in order to be able to calle.preventDefault
- fix avoids the
- removed
touchHandlerOption
prop- fix above deprecates this prop
v5.0.0
- Introduce react hook,
useSwipeable
- Core rewrite to simplify api and trim down bundled size
- Add
size-limit
to help keep bundled size down - Add
es
export via"module": "es/index.js"
topackage.json
- Add
prettier
code 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/
dir
event data onSwiping = ({ dir }) => console.log(`swiping - ${dir}`)
- can be replaced with direction/
- [BREAKING] deprecated props
flickThreshold
stopPropagation
disabled
v4.3.0
- Add
rotationAngle
prop. #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!