Skip to content

Commit

Permalink
exhaustive deps
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Nov 13, 2024
1 parent 1fd46af commit 7f5bd92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Texture.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint react-hooks/exhaustive-deps: 1 */
import * as React from 'react'
import { Texture as _Texture, TextureLoader } from 'three'
import { useLoader, useThree } from '@react-three/fiber'
Expand Down Expand Up @@ -50,7 +51,7 @@ export function useTexture<Url extends string[] | string | Record<string, string

useLayoutEffect(() => {
onLoad?.(mappedTextures)
}, [mappedTextures])
}, [mappedTextures, onLoad])

return mappedTextures
}
Expand Down

0 comments on commit 7f5bd92

Please sign in to comment.