Releases
v6.0.0
New Features:
include passive event listener option, by default, to internal uses of addEventListener
add new onTap
event handler prop which executes its callback after a tap
add new vxvy
event data property
[ deltaX/time, deltaY/time]
- velocity per axis
Thank you @upatel32 !
Breaking Changes:
We have a migration guide available here: React Swipeable v6 changes and migration guide
remove <Swipeable>
component
event data update correctly calculate deltaX
and deltaY
from initial - current
to current - initial
fixes issue #157
Thank you @upatel32 !
drop support for ie11
using addEventListener
options object needs to be polyfilled, browser support
requires react >= 16.8.3, additionally supports new react v17
Bug fixes:
Swipes can now start at edges (x or y === 0)
Infrastructure:
typescript Converted entire code base, tests, and examples to typescript
changed type EventData
-> SwipeEventData
- The event data provided for all swipe event callbacks
removed type SwipeableOptions
- use SwipeableProps
now
removed types associated with <Swipeable>
component
new type TapCallback
- callback for the new onTap
prop handler
new type SwipeDirections
- "Left" | "Right" | "Up" | "Down"
Converted tests to @testing-library/react
, react testing library
Build bundles with microbundle
. microbundle
export new "modern" build - via package.json esmodule
property
Maintenance:
Upgraded all dev dependencies, jest
, babel
, webpack
, eslint
, prettier
You can’t perform that action at this time.