我正在尝试将参数传递给配方常量内的handlePush并获取handlePush不是函数
const Recipe = ({ name, durationLabel, numberOfServings, handlePress, keepBubble, handlePush }) => (
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<TouchableHighlight onPress={() => handlePush(keepBubble)}>
<View syle={{ justifyContent:'center'}}>
{keepBubble ? (
<Image
source={require("app/assets/icons/bubbleOff.png")}
style={{justifyContent: 'center'}}
/>)
: (
< Image
source = {require("app/assets/icons/bubbleOn.png")}
style={{justifyContent:'center'}}
/>)}
</View>
</TouchableHighlight>
</View>
我的功能如下
handlePush(keepBubble){
console.log("BUBBLES", keepBubble);
};