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

Function getInitialState

examples/app/SimplePattern/pattern.tsx:48–48  ·  view source on GitHub ↗
(numItems: number)

Source from the content-addressed store, hash-verified

46const pattern = [UP, DOWN, UP, DOWN];
47
48const getInitialState = (numItems: number): CarouselState => ({ pos: numItems - 1, sliding: false, dir: NEXT });
49
50const Carousel: FunctionComponent<{children: ReactNode}> = (props) => {
51 const numItems = React.Children.count(props.children);

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…