Skip to content

Weather app demonstrating simple code sharing for React Web and React Native

Notifications You must be signed in to change notification settings

josephrstraub/weather

Repository files navigation

Quickstart

Clone the repository

$ git clone https://github.com/josephrstraub/weather.git

Install dependencies

$ yarn install

Get API keys

  1. Create a GCP project.
  2. Create API credentials.
  3. Enable the Maps, Geocoding, and Places APIs.
  4. Ensure the enabled APIs are also enabled for your created key.

Create .env file in project root with the following structure

SKIP_PREFLIGHT_CHECK=true
REACT_APP_GOOGLE_API_KEY=<your-google-api-key>
REACT_APP_OPEN_WEATHER_MAP_API_KEY=<your-open-weather-api-key>

Add the following key/value pair within the 'expo' section of app.json

"extra": {
  "apiKeys": {
    "google": "<your-google-api-key>",
    "openWeatherMap": "<your-open-weather-api-key>"
  }
}

Add the following prior to the closing body tag in public/index.html

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<your-google-api-key>&libraries=places"></script>

Start

$ yarn run <ios|android|web>

About

Weather app demonstrating simple code sharing for React Web and React Native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published