const [gender,setgender]=useState()
const handlegender=(e)=>{
setgender(e.target.value)
}
<form>
<div>
<label>Gender</label>
<input type="radio" name="gender" value="male" onChange={handlegender} />
Male
<input type="radio" name="gender" value="Female" onChange={handlegender}/>
Female
</div>
</form>