Skip to content

Commit

Permalink
Merge pull request #647 from ishan28mkip/fix/re-render-children-when-…
Browse files Browse the repository at this point in the history
…props-change

fix: child re render when props change
  • Loading branch information
Lukasz-pluszczewski authored Nov 19, 2020
2 parents cca4f55 + b427cda commit 5d1aa22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-carousel/src/components/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const Carousel = (props) => {

useEffect(() => {
setSlides(children);
}, []);
}, [children]);

useEffect(() => {
setItemOffset(props.offset);
Expand Down

0 comments on commit 5d1aa22

Please sign in to comment.