// App.js import { useWeatherService } from './useWeatherService'; ... function App({coords}) { const [ currentUnit, setUnit ] = useState(TEMPERATURE_UNITS.metric); const [ weather, getWeather ] = useWeatherService(); // <- initializing the hook useEffect(() => { if (coords) { const { latitude: lat, longitude: lon } = coords; getWeather(lat, lon, currentUnit.sysName); // <- calling the hook } }, [coords, currentUnit]); ... return (