Reputation: 1320
I am using expo's snack, no icon ever showing correctly, what am I doing wrong? I test this snack https://callstack.github.io/react-native-paper/button.html, and many other snack, but it always show rectangle icon.
Upvotes: 1
Views: 2508
Reputation: 34
The issue is visible in expo log as
Tried to use the icon 'stepforward' in a component from 'react-native-paper', but 'react-native-vector-icons' could not be loaded. To remove this warning, try installing 'react-native-vector-icons' or use another method to specify icon: https://callstack.github.io/react-native-paper/icons.html. Even if you try to add package it's still not resolved by this, some issue in expo as reported here Expo forums
Following is the workaround as Snack link
import { Ionicons } from '@expo/vector-icons';
2.Get type
import SimpleIcon from 'react-native-vector-icons/SimpleLineIcons';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
then pass as child
Upvotes: 1