Newer
Older
import React, {useEffect, useState} from 'react'
import DropDown from './components/DropDown';
const [selectedCountry, changeCountry] = useState<string>("")
const countryFunction = (event:React.ChangeEvent<HTMLSelectElement>):void => {
changeCountry(event.target.value);
}
<DropDown geoOption='countries' name='country_name' code='country_code' changeFunction={countryFunction}/>
<p> This is our selected country {selectedCountry}</p>