First release of the modernized library. Breaking — see migration notes below.
⚠ Breaking changes
reactandreact-nativeare now peerDependencies (any version your app uses).- Removed the
abortcontroller-polyfillandnode-fetchruntime deps — the component uses the globalfetch/AbortController(RN ≥ 0.60).
Features
- Full TypeScript rewrite with bundled type definitions (
import UserAvatar, { UserAvatarProps }). - New
ignoreContentTypeprop for hosts (e.g. S3 URLs without an extension) that omitcontent-type. - Initials capped at 3 characters.
Bug fixes
textStylenow applies reliably, including after the async render (#117, #98).- Removed deprecated
defaultPropsand its console warning (#131, #130). - Trust responses without a
content-typeheader (#120). - Aborted image fetches no longer warn (#103).
- Correct, bundled TypeScript types — no more missing declaration file (#114, #129, #98).
- Removed the fragile platform-specific header access and require-cycle warning (#118).
Tooling
- react-native-builder-bob (commonjs + module + typescript), ESLint 8, Prettier 3, TypeScript 5, Jest 29, husky 9.
- GitHub Actions CI + CodeQL + OIDC trusted publishing with provenance.
- Example upgraded to Expo SDK 57 (React 19.2 / RN 0.82).
Migration
Most apps upgrade with no code changes. Ensure react/react-native are installed (they already are in any RN app). textStyle now works as documented.