diff --git a/src/components/carousel/index.tsx b/src/components/carousel/index.tsx index f98eadd..acbeffa 100644 --- a/src/components/carousel/index.tsx +++ b/src/components/carousel/index.tsx @@ -29,6 +29,10 @@ export const Carousel: FunctionComponent = (userProps: CarouselPr getShowArrow(props.children.length, props.show, props.infinite, current), ); + React.useEffect(() => { + setItems(initItems(props.children, props.slide, props.infinite)); + }, userProps.children); + const slide = (direction: SlideDirection, slide: number): void => { if ( animation.isSliding ||