Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class test extends PureComponent {
- constructor(props) {
- super(props);
- this.state = {};
- }
- renderFoodTexts() {
- const { rides } = this.props;
- if (rides) {
- return rides.map((ride) => {
- if (ride.food) {
- return <Text>hi, this the food: {ride.food}</Text>
- }
- return undefined;
- })
- }
- return undefined
- }
- render() {
- return (
- <View style={styles.container}>
- {this.renderFoodTexts()}
- </View>
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement