---
url: https://cri-middleware.github.io/SSPlayerForReactNative/api/functions/useSsTextures.md
---
# Function: useSsTextures()

> **useSsTextures**(`sources`): `Record`<`string`, [`SkImage`](https://wcandillon.github.io/react-native-skia/)> | `null`

Defined in: [packages/react-native-spritestudio/src/view/useSsTextures.ts:41](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/view/useSsTextures.ts#L41)

Decodes override textures into `SkImage`s.

Its own hook rather than a loop over RN Skia's `useImage`, which cannot be
called once per entry of a map whose size changes between renders — and which
would not reach the app's asset directory either.

Returns null until every texture has decoded, so a caller can hold off
drawing rather than flash a frame with a missing atlas.

## Parameters

### sources

[`SsTextureSources`](../type-aliases/SsTextureSources.md) | `null` | `undefined`

## Returns

`Record`<`string`, [`SkImage`](https://wcandillon.github.io/react-native-skia/)> | `null`
