Hi I am facing problem when using function with return to show Material dialog for loading dynamic values.
This is my code
Please help me I am new in RN
showMaterialDialog(key) {
this.state.data.filter(obj => {
return obj.key === key;
}).map((obj, idx) => {
return (
<MaterialDialog
title="Use Google's Location Service?"
visible={true}
onOk={() => this.setState({ visible: false })}
onCancel={() => this.setState({ visible: false })}>
</MaterialDialog>
)
})
}
I am calling this function onPress of Text