Skip to content

Commit

Permalink
fix: exhaustive deps rule
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Dec 7, 2024
1 parent 01be10e commit 18f398a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const ImageBase: ForwardRefComponent<Omit<ImageProps, 'url'>, THREE.Mesh> = /* @
planeBounds[1] * ref.current.geometry.parameters.height
)
}
/* eslint react-hooks/exhaustive-deps: 1 */
}, [planeBounds[0], planeBounds[1]])

Check warning on line 151 in src/core/Image.tsx

View workflow job for this annotation

GitHub Actions / test

React Hook React.useLayoutEffect has a missing dependency: 'planeBounds'. Either include it or remove the dependency array

Check warning on line 151 in src/core/Image.tsx

View workflow job for this annotation

GitHub Actions / test

React Hook React.useLayoutEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked

Check warning on line 151 in src/core/Image.tsx

View workflow job for this annotation

GitHub Actions / test

React Hook React.useLayoutEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked
return (
<mesh ref={ref} scale={Array.isArray(scale) ? [...scale, 1] : scale} {...props}>
Expand Down

0 comments on commit 18f398a

Please sign in to comment.