Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit b427cda

Browse files
committed
fix: child re render
1 parent cca4f55 commit b427cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

react-carousel/src/components/Carousel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const Carousel = (props) => {
150150

151151
useEffect(() => {
152152
setSlides(children);
153-
}, []);
153+
}, [children]);
154154

155155
useEffect(() => {
156156
setItemOffset(props.offset);

0 commit comments

Comments
 (0)