I already implement that. It works! but could it be expensive ?? if it is then how?
const [neighbourCountryGeneraleDes, setNeighbourCountryGeneralDes] = useState(neighbour_country_generale_des_init);
const [neighbouringProvincePopulationSummary, setNeighbouringProvincePopulationSummary] = useState(neighbouring_province_population_summary_init);
const onChangeInput = (e, data, setData) => {
const { name, value } = e.target;
setData({ ...data, [name]: value });
};
JSX
<div style={{ marginBottom: "15px" }}>
<SearchInputField
width="785px"
headText="বন্দরের নাম"
icon={inputIcon}
bool={false}
placeholder="বন্দরের নাম লিখুন"
name="air_port_name"
value={neighbourCountryGeneraleDes.air_port_name}
handleChange={(e) => onChangeInput(e, neighbourCountryGeneraleDes,setNeighbourCountryGeneralDes)}
/>
</div>