How to save or pass the variable in binded function in on press in a component which is return after pushing in loop in react native?

im getting this.

 LOG  {"_dispatchInstances": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.5446140170097351, "actualStartTime": 180995068.371205, "alternate": [FiberNode], "child": [FiberNode], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Object], "flags": 1, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.2353070080280304, "sibling": null, "stateNode": null, "subtreeFlags": 5, "tag": 11, "treeBaseDuration": 1.0265399813652039, "type": [Object], "updateQueue": null}, "_debugSource": {"columnNumber": 7, "fileName": "C:\Users\dell\Documents\GitHub\DressUpm\node_modules\react-native\Libraries\Components\View\View.js", "lineNumber": 32}, "actualDuration": 0.23176899552345276, "actualStartTime": 180995068.676513, "alternate": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.3187679946422577, "actualStartTime": 180995109.337359, "alternate": [Circular], "child": [FiberNode], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RCTView", "flags": 4, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.15715399384498596, "sibling": null, "stateNode": [ReactNativeFiberHostComponent], "subtreeFlags": 1, "tag": 5, "treeBaseDuration": 0.8043089509010315, "type": "RCTView", "updateQueue": null}, "child": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.016692012548446655, "actualStartTime": 180995068.801282, "alternate": [FiberNode], "child": [FiberNode], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Object], "flags": 0, "index": 0, "key": "2", "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": null, "return": [Circular], "selfBaseDuration": 0.2726159989833832, "sibling": [FiberNode], "stateNode": null, "subtreeFlags": 0, "tag": 11, "treeBaseDuration": 0.563770979642868, "type": [Object], "updateQueue": null}, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RCTView", "flags": 4, "index": 0, "key": null, "lanes": 0, "memoizedProps": {"accessibilityState": undefined, "accessible": true, "children": [Array], "collapsable": false, "focusable": true, "hitSlop": undefined, "onBlur": [Function onBlur], "onClick": [Function onClick], "onFocus": [Function onFocus], "onResponderGrant": [Function onResponderGrant], "onResponderMove": [Function onResponderMove], "onResponderRelease": [Function onResponderRelease], "onResponderTerminate": [Function onResponderTerminate], "onResponderTerminationRequest": [Function onResponderTerminationRequest], "onStartShouldSetResponder": [Function onStartShouldSetResponder], "style": [Array]}, "memoizedState": null, "mode": 2, "pendingProps": {"accessibilityState": undefined, "accessible": true, "children": [Array], "collapsable": false, "focusable": true, "hitSlop": undefined, "onBlur": [Function onBlur], "onClick": [Function onClick], "onFocus": [Function onFocus], "onResponderGrant": [Function onResponderGrant], "onResponderMove": [Function onResponderMove], "onResponderRelease": [Function onResponderRelease], "onResponderTerminate": [Function onResponderTerminate], "onResponderTerminationRequest": [Function onResponderTerminationRequest], "onStartShouldSetResponder": [Function onStartShouldSetResponder], "style": [Array]}, "ref": {"current": [ReactNativeFiberHostComponent]}, "return": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.30084601044654846, "actualStartTime": 180995068.616205, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Object], "flags": 0, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0.05177000164985657, "sibling": null, "stateNode": null, "subtreeFlags": 5, "tag": 10, "treeBaseDuration": 0.7912329733371735, "type": [Object], "updateQueue": null}, "selfBaseDuration": 0.11538398265838623, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 4667, "viewConfig": [Object]}, "subtreeFlags": 1, "tag": 5, "treeBaseDuration": 0.7394629716873169, "type": "RCTView", "updateQueue": null}, "_dispatchListeners": [Function onResponderRelease], "_targetInst": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.5446140170097351, "actualStartTime": 180995068.371205, "alternate": [FiberNode], "child": [FiberNode], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Object], "flags": 1, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.2353070080280304, "sibling": null, "stateNode": null, "subtreeFlags": 5, "tag": 11, "treeBaseDuration": 1.0265399813652039, "type": [Object], "updateQueue": null}, "_debugSource": {"columnNumber": 7, "fileName": "C:\Users\dell\Documents\GitHub\DressUpm\node_modules\react-native\Libraries\Components\View\View.js", "lineNumber": 32}, "actualDuration": 0.23176899552345276, "actualStartTime": 180995068.676513, "alternate": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.3187679946422577, "actualStartTime": 180995109.337359, "alternate": [Circular], "child": [FiberNode], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RCTView", "flags": 4, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.15715399384498596, "sibling": null, "stateNode": [ReactNativeFiberHostComponent], "subtreeFlags": 1, "tag": 5, "treeBaseDuration": 0.8043089509010315, "type": "RCTView", "updateQueue": null}, "child": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.016692012548446655, "actualStartTime": 180995068.801282, "alternate": [FiberNode], "child": [FiberNode], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Object], "flags": 0, "index": 0, "key": "2", "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": null, "return": [Circular], "selfBaseDuration": 0.2726159989833832, "sibling": [FiberNode], "stateNode": null, "subtreeFlags": 0, "tag": 11, "treeBaseDuration": 0.563770979642868, "type": [Object], "updateQueue": null}, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RCTView", "flags": 4, "index": 0, "key": null, "lanes": 0, "memoizedProps": {"accessibilityState": undefined, "accessible": true, "children": [Array], "collapsable": false, "focusable": true, "hitSlop": undefined, "onBlur": [Function onBlur], "onClick": [Function onClick], "onFocus": [Function onFocus], "onResponderGrant": [Function onResponderGrant], "onResponderMove": [Function onResponderMove], "onResponderRelease": [Function onResponderRelease], "onResponderTerminate": [Function onResponderTerminate], "onResponderTerminationRequest": [Function onResponderTerminationRequest], "onStartShouldSetResponder": [Function onStartShouldSetResponder], "style": [Array]}, "memoizedState": null, "mode": 2, "pendingProps": {"accessibilityState": undefined, "accessible": true, "children": [Array], "collapsable": false, "focusable": true, "hitSlop": undefined, "onBlur": [Function onBlur], "onClick": [Function onClick], "onFocus": [Function onFocus], "onResponderGrant": [Function onResponderGrant], "onResponderMove": [Function onResponderMove], "onResponderRelease": [Function onResponderRelease], "onResponderTerminate": [Function onResponderTerminate], "onResponderTerminationRequest": [Function onResponderTerminationRequest], "onStartShouldSetResponder": [Function onStartShouldSetResponder], "style": [Array]}, "ref": {"current": [ReactNativeFiberHostComponent]}, "return": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.30084601044654846, "actualStartTime": 180995068.616205, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Object], "flags": 0, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0.05177000164985657, "sibling": null, "stateNode": null, "subtreeFlags": 5, "tag": 10, "treeBaseDuration": 0.7912329733371735, "type": [Object], "updateQueue": null}, "selfBaseDuration": 0.11538398265838623, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 4667, "viewConfig": [Object]}, "subtreeFlags": 1, "tag": 5, "treeBaseDuration": 0.7394629716873169, "type": "RCTView", "updateQueue": null}, "bubbles": undefined, "cancelable": undefined, "currentTarget": {"_children": [[ReactNativeFiberHostComponent]], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.23176899552345276, "actualStartTime": 180995068.676513, "alternate": [FiberNode], "child": [FiberNode], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RCTView", "flags": 4, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.11538398265838623, "sibling": null, "stateNode": [Circular], "subtreeFlags": 1, "tag": 5, "treeBaseDuration": 0.7394629716873169, "type": "RCTView", "updateQueue": null}, "_nativeTag": 4667, "viewConfig": {"Commands": [Object], "NativeProps": [Object], "bubblingEventTypes": undefined, "directEventTypes": [Object], "uiViewClassName": "RCTView", "validAttributes": [Object]}}, "defaultPrevented": undefined, "dispatchConfig": {"dependencies": ["topTouchCancel", "topTouchEnd"], "registrationName": "onResponderRelease"}, "eventPhase": undefined, "isDefaultPrevented": [Function functionThatReturnsFalse], "isPersistent": [Function functionThatReturnsTrue], "isPropagationStopped": [Function functionThatReturnsFalse], "isTrusted": undefined, "nativeEvent": {"changedTouches": [[Circular]], "identifier": 0, "locationX": 36.435508728027344, "locationY": 60.07415771484375, "pageX": 46.435508728027344, "pageY": 545.0741577148438, "target": 4665, "targetSurface": -1, "timestamp": 1649496640240, "touches": []}, "target": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 3.2463849782943726, "actualStartTime": 180993717.489128, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RCTImageView", "flags": 0, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0.047922998666763306, "sibling": null, "stateNode": [Circular], "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.047922998666763306, "type": "RCTImageView", "updateQueue": null}, "_nativeTag": 4665, "viewConfig": {"NativeProps": [Object], "bubblingEventTypes": undefined, "directEventTypes": [Object], "uiViewClassName": "RCTImageView", "validAttributes": [Object]}}, "timeStamp": 1649496640248, "touchHistory": {"indexOfSingleActiveTouch": 0, "mostRecentTimeStamp": 1649496640240, "numberActiveTouches": 0, "touchBank": [[Object]]}, "type": undefined}

from this code.

 ```
    function abc(filename)
{
  console.log(filename);
}

function bottomLayer(fileNames) 
{
  var items=[];
  for (var i=0;i<fileNames.length;i++)
  {
    items.push(
    <Pressable key={i+2} style={({ pressed }) => [{ height: pressed ? 100 : 70, width: pressed ? 100 : 90, paddingLeft:10,alignSelf:'flex-end', paddingRight:10}]} 
    onPress={abc.bind(fileNames[i])}>
      <Image key={i+2} style={styles.pic} source={{uri:"file://"+RNFS.ExternalDirectoryPath+'/'+fileNames[i]}} />
    </Pressable>
    );
  }
  if(fileNames.length==0)
  {
    items.push(
    <Pressable key={0} style={({ pressed }) => [{ height: pressed ? 100 : 70, width: pressed ? 100 : 90, paddingLeft:10, paddingRight:10 }]} onPress={()=>{correctPressFunction(shirtIsPress?1:(jeansIsPress?2:3),"")}}>
      <Image key={i+2} style={styles.pic} source={sample} />
    </Pressable>
    );
  }
  return items;
}
    ```

i want to send the filenames[i] to the binded function abc when Pressable is pressed. But what im getting is undefined. i want to get its value but it seems rather it is not saved or should i say it does not stay there.