Open benjaminle9x opened 3 years ago
loadWifiList function returns an array that contains ssid's and other informations. If you are populating your wifi list using map, you can assign an alert function on your list items.
{
this.state.wifiList.map((e, i) => {
return (
<TouchableOpacity key={i} onPress={() => alert(e.SSID)}>
</TouchableOpacity>
)
})
}
I am setting up a click event on each object of the wifiList array so that when I click on a specific Wi-Fi, it sends an alert message of its SSID. How do I do this?