Open Jinentonik opened 4 years ago
<Accordion
renderContent={() => renderContent(bgColor, fertilizers)}
/>
const renderContent = (bgColor, fertilizers) => {
return (
<View style={[styles.viewContainerStyle, { backgroundColor: bgColor }]}>
{renderFertilizersForMonth(fertilizers)}
</View>
);
};
This is the way I do it.
Hi,
I need to create a button inside renderContent. When the button is clicked, it will update the server and receive new list from server . So, i will need to pass my list data into renderContent.
Can anyone teach me how to pass props inside renderContent?
This is my original code and this works fine.
But i cannot find a way to pass 'setOrderData' into renderContent. This is what i have tried and it does not work: