title: React Native : How to browse an array with many children
body: <p>I would like to browse an array that has many children, in one of my screen, in order to make a indented list, like this: 
  1. Some item
    1.1. Some item 
       1.1.1. Some item
    1.2. Some item</p>
  
  <p>One method that I found is to create an array, with objects, like this:</p>
  
  <pre><code>names: [
    {
      id: 0,
      level: 1,
      name: "Football",
      children: [
        {
          id: 1,
          level: 2,
          name: "Shoes",
          children: [
            {
              id: 2,
              level: 3,
              name: "Shoes 1"
            },
            {
              id: 3,
              level: 3,
              name: "Shoes 2"
            },
            {
              id: 4,
              level: 3,
              name: "Shoes 3"
            }
          ]
        }
      ]
    }
  ];
  </code></pre>
  
  <p>I've already tried to browse this array, using <code>map</code>: </p>
  
  <pre><code>this.state.names.map((item, index) =&gt; (
    &lt;TouchableOpacity&gt;
      key={item.id}
      style={styles.container}
      onPress={() =&gt; this.alertItemName(item)}&gt;
      &lt;Text style={styles.text}&gt;{item.name}&lt;/Text&gt;
    &lt;/TouchableOpacity&gt;
  ));
  </code></pre>
  
  <p>But, this kind of method browses only the first item, that is at level 1.</p>
  
  <p>I don't know if I'm using the right component and the right method to do it. I've also looked at the <code>FlatList</code> component, but I had the same problem.</p>