Issue
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
Solution
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.
In that case, the final code will look like this:
import MaterialIcon from 'react-native-vector-icons/MaterialIcons;
import Ionicon from 'react-native-vector-icons/Ionicons';
Thank You Fran Rios
Answered By - Roman Akash
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.