deepCompare
performs a deep comparison of two objects. It automatically unwraps JS Map
s, Set
s, and ImmutableJS objects.
deepCompare(left, right)
// Will output:
// {
// isEqual: false,
import {useEffect, useRef} from 'react'; | |
import {Animated} from 'react-native'; | |
const {diffClamp} = Animated; | |
const useCollapsibleHeader = headerHeight => { | |
const listRef = useRef(null); | |
const scrollY = useRef(new Animated.Value(0)); | |
const scrollYClamped = diffClamp(scrollY.current, 0, headerHeight); |