React Native Module
The@credo-ts/react-native package provides React Native-specific dependencies and utilities for running Credo agents in React Native applications.
Installation
Requires React Native version 0.71.4 or higher.
Peer Dependencies
The following peer dependencies are required:react-native(version 0.71.4 or higher)react-native-fs(version 2.20.0)react-native-get-random-values(version 1.11.0 to 2.x)
@animo-id/expo-secure-environment(^0.1.1) - For Expo secure storageexpo-crypto(^15.0.7) - For Expo crypto operations
Setup
Import the polyfill at the top of your entry file:What It Provides
The React Native module exports:- agentDependencies - Platform-specific dependencies for React Native
- ReactNativeFileSystem - File system implementation using react-native-fs
Platform Considerations
Storage
React Native requires the@hyperledger/askar-react-native package instead of the Node.js version:
Networking
For DIDComm connections, configure appropriate transports for mobile environments:Secure Storage
For production apps, consider using secure storage:See Also
- Node Module - Node.js platform support
- Platform Setup Guide - Platform-specific configuration
- Askar Module - Storage and key management