farahat80 / react-open-weather

React open weather is a React Component loading forecast data from Various weather providers (currently OpenWeather, WeatherBit and VisualCrossing)
MIT License
115 stars 64 forks source link

Warning: p: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #118

Open SheldonWBM opened 6 months ago

SheldonWBM commented 6 months ago

How to re-write the defaultProps:

 const { data, errorMessage, isLoading } = weatherData({
    lat: myLat.toString(),
    lon: myLong.toString(),
  });

to use default parameters for future proofing?

coopernicholas commented 2 months ago

I second this. Any way to stop the console error message from happening?

farahat80 commented 2 months ago

@coopernicholas i will be working on a solution for this soon

coopernicholas commented 2 months ago

@farahat80 thanks for such a quick response!