use-carousel-hook
Advanced tools
Comparing version 0.0.5 to 0.0.6
# Changelog | ||
## [0.0.6] | ||
- Fix bug with inView values not updating | ||
## [0.0.5] | ||
@@ -4,0 +8,0 @@ |
@@ -18,3 +18,3 @@ import { useState, useRef, useEffect, useReducer, useCallback } from 'react'; | ||
}, [ref.current]); | ||
const updateInView = useCallback(() => { | ||
const updateInView = () => { | ||
const carouselEl = ref.current; | ||
@@ -46,3 +46,3 @@ const childEls = [...carouselEl.children]; | ||
setInView(inView); | ||
}, [ref.current]); | ||
}; | ||
useEffect(() => { | ||
@@ -49,0 +49,0 @@ window.addEventListener('resize', updateMaxIndex); |
{ | ||
"name": "use-carousel-hook", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Adds functionality for carousels using React hooks", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12791