NativeImage
NativeImage — a remote picture (thumbnail, cover, photo) with caching. Draws with expo-image when the app passes it (`modules.image` on `GenesisModulesProvider`): cached in memory and on disk, an optional blurhash/thumbhash `placeholder`, a cross-fade that Reduce Motion turns off, and a `recyclingKey` (the URL by default) so a recycled FlashList row never flashes the previous picture. A `cacheKey` caches the picture under a stable key instead of its URL, for signed URLs that rotate (a new expiry or signature would otherwise miss the disk cache and download it again). Without it, React Native's `Image`. Give it a size (className or `width`/`height`). Decorative unless `alt` is given.
packages/ui-native/src/components/image.tsx
Import
Subpath export:
@marktiderman/genesis-ui-nativeimport { NativeImage } from "@marktiderman/genesis-ui-native";Components
Auto-generated from TypeScript source via
react-docgen-typescript.NativeImage
| Prop | Type | Default | Description |
|---|---|---|---|
| src* | string | — | |
| alt | string | — | Read by screen readers. Without it the picture is decorative. |
| cacheKey | string | — | expo-image only: caches the picture under this key instead of its URL, so a signed URL that rotates (a new expiry or signature for the same file) still hits the memory and disk cache. Use a key that names the file, such as its storage path or id. |
| className | string | — | |
| contentFit | enum | cover | Default `"cover"`. |
| height | number | — | |
| onError | (() => void) | — | The picture couldn't be loaded (draw a fallback). |
| placeholder | { blurhash: string; } | { thumbhash: string; } | — | expo-image only: `{ blurhash }` or `{ thumbhash }` shown while loading. |
| priority | enum | — | expo-image only: load order among images. |
| recyclingKey | string | — | expo-image only: resets the view when it changes (recycled rows). Default `cacheKey`, then `src`. |
| testID | string | — | |
| width | number | — |