MCPcopy Create free account
hub / github.com/FormidableLabs/react-swipeable / slide

Function slide

examples/app/SimpleCarousel/Carousel.tsx:35–40  ·  view source on GitHub ↗
(dir: Direction)

Source from the content-addressed store, hash-verified

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),

Callers 1

CarouselFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…