title: Passing props from child function to parent function with React Native
body: <p>Within Session() I want to access stateABC, which is in Item5().</p>
  <p>The setup of my code looks like this:</p>
  <p>Session.js:</p>
  <pre><code>function Session() {
  //get handleRender(item).props.stateABC here
      return (
          &lt;View&gt;
              {handleRender(item)}
          &lt;/View&gt;
      );
  }
  </code></pre>
  <p>handleRender.js:</p>
  <pre><code>export function handleRender(item) {
  
      if(item == &quot;Item5&quot;){
          return (
                  {Item5()}
              );
      }
  }
  </code></pre>
  <p>Item5.js:</p>
  <pre><code> export function Item5() {
      
          const [stateABC, setStateABC] = useState(&quot;123&quot;); 
      
          return (
                      ....
                  );
      }
  </code></pre>
  <p>I tried to get the value in Session() by using handleRender(item).props.stateABC, but all I get is an empty value.</p>
  <p>Is it possible to receive properties from a function like that or are props only accessible in class components?</p>
  <p>Any help is appreciated.</p>
  <p>Thanks</p>