Fonts and icons REACT NATIVE | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Fonts and icons REACT NATIVE

Hello! I need your help with icons and fonts in React-Native. Fragment of programming code(when I tried to use Icons): __________________________________________________ import { AntDesign } from '@expo/vector-icons'; export const AddToDo = ({ onSubmit }) => { return <View style={styles.block}> <AntDesign.Button onPress={pressHandler} name='pluscircleo'> Add </AntDesign.Button> </View> ); } _______________________________________ And ERROR : fontFamily "anticon" is not a system font and has not been loaded through Font.loadAsync. - If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system. - If this is a custom font, be sure to load it with Font.loadAsync. ______________________________________________________________ The same history when I'm trying to use Fonts....

2nd Jul 2020, 8:34 AM
Tamara Malakhova
Tamara Malakhova - avatar
3 ответов
2nd Jul 2020, 10:05 AM
Burey
Burey - avatar
0
Try this import AntIcon from "react-native-vector-icons/AntDesign"; ... <AntIcon name="minuscircleo" color="green" size={50} /> Reference https://stackoverflow.com/questions/52840741/how-to-use-antdesign-icon-in-react-native-elements
2nd Jul 2020, 9:42 AM
Gordon
Gordon - avatar
0
Gordon, I’ve tried. It hasn't helped. I have the same error.
2nd Jul 2020, 9:47 AM
Tamara Malakhova
Tamara Malakhova - avatar