title: React Native, accessing a single element from an array nested in state
body: <p>how can I access a single element from an array nested in a state like this</p>
  <pre><code>state = {
      modal: false,
      post: [
        {
          key: &quot;1&quot;,
          title: &quot;A Good Boi&quot;,
          des: &quot;He's a good boi and every one know it.&quot;,
          image: require(&quot;../assets/dog.jpg&quot;),
        },
        {
          key: &quot;2&quot;,
          title: &quot;John Cena&quot;,
          des: &quot;As you can see, You can't see me!&quot;,
          image: require(&quot;../assets/cena.jpg&quot;),
        },
      ]
    };
  .....
      &lt;MyList.Provider
            value={{
             
            }}
          &gt;
            &lt;FlatList
              data={this.state.post}
              renderItem={({ item }) =&gt; (
                &lt;&gt;
                  &lt;TouchableOpacity
                    activeOpacity={0.7}
                    onPress={() =&gt; this.deleteItem(item)}
                    style={styles.Delete}
                  &gt;
                    &lt;MaterialCommunityIcons name=&quot;delete&quot; color=&quot;red&quot; size={30} /&gt;
                  &lt;/TouchableOpacity&gt;
                  &lt;TouchableOpacity
                    activeOpacity={0.7}
                    onPress={() =&gt; this.props.navigation.navigate(&quot;Edit&quot;, item)}
                    style={styles.Edit}
                  &gt;
                    &lt;MaterialCommunityIcons
                      name=&quot;playlist-edit&quot;
                      color=&quot;green&quot;
                      size={35}
                    /&gt;
                  &lt;/TouchableOpacity&gt;
                  &lt;Card
                    title={item.title}
                    subTitle={item.des}
                    image={item.image}
                    onPress={() =&gt;
                      this.props.navigation.navigate(&quot;Details&quot;, item)
                    }
                  /&gt;
                &lt;/&gt;
              )}
            /&gt;
          &lt;/MyList.Provider&gt;
  </code></pre>
  <p>how can I do this like <code>this.state.post({title})</code> or some way else??
  I need to use this values with context so I can share and change some particular data with between 2 screens.  I know  to pass data I need to use context or navigation.navigate(&quot;route name&quot;,item). But if I use navigation I won't able to edit it but how can I pass data in context value from array set, if I do this.state.post it will return whole list and if i do this.state.post[0].title it will return only title of that post. So how can i do this? Please help</p>