У меня ошибка, когда я пытаюсь получить значки, использую библиотекуact-native-vector-icons. Я прочитал всю документацию по библиотеке и попробовал их пример, но ничего.
class AuthScreen extends Component {
constructor(props){
super(props);
this.state = {
userIcon: "",
lockIcon: ""
}
};
render () {
return (
<View style={styles.container}>
<TextInput
placeholder="Usuario"
style={styles.InputContainer}
placeholderTextColor="#EEE"
inlineImageLeft={this.state.userIcon}
/>
<TextInput
placeholder="Contraseña"
secureTextEntry={true}
style={styles.InputContainer}
placeholderTextColor="#EEE"
inlineImageLeft='search_icon'
inlineImageLeft={this.state.lockIcon}
/>
</View>
);
}
}
Promise.all([
Icon.getImageSource("md-person", 30),
Icon.getImageSource("md-lock", 30)
]).then( sources =>
this.setState({
userIcon: sources[0],
lockccccIcon: sources[1]
})
);