title: TypeError: undefined is not an object (evaluating '_props$route$params$d.id')
body: <p>I am trying to fetch an api and get details of resources in resources detail page but getting an error of this <code>TypeError: undefined is not an object (evaluating '_props$route$params$d.id')</code></p>
  <p><strong><a href="https://i.stack.imgur.com/XAg8d.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XAg8d.jpg" alt="" /></a></strong></p>
  <p><strong>data containing my api</strong></p>
  <pre><code>const clickedItem = (data) =&gt; {
          props.navigation.navigate(&quot;ResourceDetail&quot;, { data: data })
   }  
  
  const renderData = (item) =&gt; {
          return (
              &lt;Card style={styles.cardStyle} onPress={() =&gt; clickedItem()}&gt;
                  &lt;Text style={{ fontSize: 25 }}&gt;{item.title}&lt;/Text&gt;
                  &lt;Text style={{ fontSize: 17 }}&gt;{item.docs}&lt;/Text&gt;
              &lt;/Card&gt;
          )
      }
  </code></pre>
  <p><strong>ResourceDetail.js</strong></p>
  <pre><code>import React from 'react'
  import { StyleSheet, Text, View } from 'react-native'
  
  function ResourceDetail(props) {
  
      const { id, title, docs } = props.route.params.data;
  
      return (
          &lt;Text&gt;{title}&lt;/Text&gt;
      )
  }
  
  export default ResourceDetail
  </code></pre>