title: React Native: SectionList get header from renderItem
body: <p>I am trying to get header name from renderItem but it giving me undefined. I need the name for a checklist so that's why I am trying to pass it to renderItem.</p>
  <p>This is my code can anyone help me out?</p>
  <pre><code>const List = (props) =&gt; {
    const list = [
      {
        &quot;id&quot;: &quot;G1600789684218&quot;,
        &quot;data&quot;:  [
           {
            &quot;id&quot;: &quot;G1600789684218&quot;,
            &quot;value&quot;: &quot;Going Skating&quot;,
          },
        ],
        &quot;name&quot;: &quot;Jack Ross&quot;,
      }
    ]
  
    const renderList = ({ item }, name) =&gt; {
      console.log(&quot;item name is&quot;, name);
      return (
        &lt;View&gt;
          &lt;ListItem title={item.value} /&gt;
        &lt;/View&gt;
      );
    };
    return (
      &lt;SectionList
        sections={list}
        keyExtractor={(item, index) =&gt; index}
        renderSectionHeader={({ section: { name, data } }) =&gt;
          &lt;Text style={styles.heading}&gt;{name}&lt;/Text&gt;
        }
        renderItem={renderList}
      /&gt;
    );
  };
  
  export default List;
  </code></pre>