react-native-hr
react-native-hr copied to clipboard
Element type is invalid
Hey, trying to use react-native-hr
in my project as this:
import {Hr} from 'react-native-hr'
...
class MyListItem extends PureComponent {
render(){
return (
<View style={styles.detailCard}>
<Text style={styles.detailCardContent}>{this.props.content}</Text>
<Hr />
<Text> --{this.props.re}</Text>
<Text>=====================</Text>
</View>
);
}
}
But above code gives me an error:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
You should import the component as follows: : import Hr from 'react-native-hr'