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.
Asked
Active
Viewed 2,153 times
1
-
For further users: https://stackoverflow.com/a/62025310/6321717 – Abdes Dec 28 '20 at 22:18
1 Answers
1
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
- Using Expo vector Icon
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