If I wanted to use Ionicons and MaterialDesign Icons from react native vector icons in the same file, how should I import it?
import Icon from 'react-native-vector-icons/MaterialIcons';
(and)
import Icon from 'react-native-vector-icons/Ionicons';
in the same file
After going through the original source files I found out that the icons was exported like
export default iconSet
So you could just use any arbitrary name to import. The final code was
import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; import Ionicon from 'react-native-vector-icons/Ionicons';
Thankyou Fran Rios
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments