react native : How to display weather data for the next 24 hours and next 7 days

1.1k views Asked by At

I am new to react native. I am writing a weather app with API on website https://darksky.net. How can i display weather data for the next 24 hours and next 7 days?

1

There are 1 answers

0
I'm not human On

I use this https://github.com/njwest/react-native-weather weather component for that.

Install with npm i --save react-native-weather

Usage:

import { WeatherWidget } from 'react-native-weather';

render() {
  return(
    <WeatherWidget
      api={"your-DarkSky.net-api-here"}
      lat={"lat"}
      lng={"lng"}
      />
  );
}

It is really easy to use just read the documentation