If you think this question is stupid, sorry for that and please forgive me because iam Beginner.:)
1) I want to declare variables using react hooks i done like this:
const[adata,setAdata]=useState(
name:"",
companyname: ""
})
2)I want to assign " name" to the value(name=filteredperson.name,companyname=filteredperson.companyname) that inside map function here, map function code:
{data.map((filteredPerson, index) => (
<td>{filteredperson.name}</td>
<td>{filteredperson.companyname}</td>
3)Finally,so i assigned my map function values to variables using react hooks, i want to print it on console.
for eg:name:{filteredperson.name} value in console
Note:filteredperson is a map function. I want to assign map values to variables that are using react hooks.