(dir: Direction)
| 33 | const [state, dispatch] = React.useReducer(reducer, getInitialState(numItems)); |
| 34 | |
| 35 | const slide = (dir: Direction) => { |
| 36 | dispatch({ type: dir, numItems }); |
| 37 | setTimeout(() => { |
| 38 | dispatch({ type: 'stopSliding' }); |
| 39 | }, 50); |
| 40 | }; |
| 41 | |
| 42 | const handlers = useSwipeable({ |
| 43 | onSwipedLeft: () => slide(NEXT), |
no outgoing calls
no test coverage detected
searching dependent graphs…