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

Function getInitialState

examples/app/SimpleCarousel/Carousel.tsx:29–29  ·  view source on GitHub ↗
(numItems: number)

Source from the content-addressed store, hash-verified

27};
28
29const getInitialState = (numItems: number): CarouselState => ({ pos: numItems - 1, sliding: false, dir: NEXT });
30
31const Carousel: FunctionComponent<{children: ReactNode}> = (props) => {
32 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…