Using @expo version I got Icon name prop autocomplete, just implementing:
type IoniconsIconNames = keyof typeof Ionicons.glyphMap;
But I noticed that using this library I got no way of doing this because there is no glyphMap prop. So how do I get proper names autocomplete for Icon component using this library?
PS: I'm using this workaround below but I don't know if it is the right way to do this.
import Ionicons from 'react-native-vector-icons/dist/glyphmaps/Ionicons.json';
type IoniconsIconNames = keyof typeof Ionicons;
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
import { ComponentProps } from "react";
type Props = ComponentProps<typeof Icon>;
export type IconName = Props["name"];
Using @expo version I got Icon name prop autocomplete, just implementing:
But I noticed that using this library I got no way of doing this because there is no glyphMap prop. So how do I get proper names autocomplete for Icon component using this library?
PS: I'm using this workaround below but I don't know if it is the right way to do this.