diff --git a/src/components/LazyChild/components/FullLazyChild.tsx b/src/components/LazyChild/components/FullLazyChild.tsx index a58be9d..22ddb7e 100644 --- a/src/components/LazyChild/components/FullLazyChild.tsx +++ b/src/components/LazyChild/components/FullLazyChild.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import React, { useCallback, useEffect } from 'react'; import { Dimensions, type LayoutChangeEvent } from 'react-native'; import Animated, { measure, @@ -39,6 +39,16 @@ export function FullLazyChild({ horizontal, } = useAnimatedContext(); + const _isMounted = useSharedValue(false); + + useEffect(() => { + _isMounted.value = true; + + return () => { + _isMounted.value = false; + }; + }, [_isMounted]); + /** * If onLayout returns a height or width value greater than 0. */