fix: useLockFrameStampPosition not enough deps

Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
This commit is contained in:
Cole Lawrence 2022-05-30 08:40:59 -04:00
parent adc712c205
commit 07febee992

View file

@ -134,13 +134,13 @@ export const useLockFrameStampPosition = (shouldLock: boolean, val: number) => {
return () => {
lockRef.current!.unlock()
}
}, [shouldLock])
}, [shouldLock, getLock])
useLayoutEffect(() => {
if (shouldLock) {
lockRef.current!.set(val)
}
}, [val])
}, [val, shouldLock])
}
/**