UNPKG

@expo/vector-icons

Version:

Built-in support for popular icon fonts and the tooling to create your own Icon components from your font and glyph map. This is a wrapper around react-native-vector-icons to make it compatible with Expo.

18 lines (15 loc) 696 B
import { Platform, NativeModules } from 'react-native'; const NativeIconAPI = NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule; export default function ensureNativeModuleAvailable() { if (!NativeIconAPI) { if (Platform.OS === 'android') { throw new Error( 'RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.' ); } throw new Error( 'RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.' ); } }