@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.
13 lines (10 loc) • 403 B
JavaScript
import {NativeModules} from "react-native";
const NativeIconAPI =
NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule;
export default function ensureNativeModuleAvailable() {
if (!NativeIconAPI) {
throw new Error(
'The native RNVectorIcons API is not available, did you properly integrate the module? Please verify your autolinking setup and recompile.'
);
}
}