Add more TODO comments

This commit is contained in:
Dan Abramov
2023-10-05 21:35:00 +01:00
parent 0a80312e2d
commit 1e8d7c6517
2 changed files with 5 additions and 0 deletions
@@ -55,6 +55,9 @@ const ImageItem = ({imageSrc, onZoom, onRequestClose}: Props) => {
)
const [translate, scale] = getImageTransform(imageDimensions, SCREEN)
// TODO: It's not valid to reinitialize Animated values during render.
// This is a bug.
const scrollValueY = new Animated.Value(0)
const scaleValue = new Animated.Value(scale || 1)
const translateValue = new Animated.ValueXY(translate)
@@ -56,6 +56,8 @@ const usePanResponder = ({
let isDoubleTapPerformed = false
let lastTapTS: number | null = null
// TODO: It's not valid to reinitialize Animated values during render.
// This is a bug.
const scaleValue = new Animated.Value(initialScale)
const translateValue = new Animated.ValueXY(initialTranslate)