Native base ListItem renders empty view?

686 views Asked by At

I am writing a very simple view with native-base.

When I did this in my render() function

  <Container>
    <Content>
      <List>
        <ListItem>
          <Text> text1 </Text>
          <Text> text2 </Text>
        </ListItem>
      </List>
    </Content>
  </Container>

I notice that nativebase renders me a completely empty list item.

But if I remove one of the Text tag. The item will show up properly.

So is it impossible to have more than 1 children for a listItem? that seems really counter intuitive. What should I do to have more than 1 item for a list item in that case?

1

There are 1 answers

2
Supriya Kalghatgi On BEST ANSWER

NativeBase List

Here is the working example of something that you need.

<Container>
  <Content>
    <List>
      <ListItem>
        <Text> text1 </Text>
        <Text> text2 </Text>
      </ListItem>
    </List>
  </Content>
</Container>

This also works well