├── .gitignore ├── App.js ├── README.md ├── app.json ├── config.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # expo 4 | .expo/ 5 | 6 | # dependencies 7 | /node_modules 8 | 9 | # misc 10 | .env.local 11 | .env.development.local 12 | .env.test.local 13 | .env.production.local 14 | 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | yarn.lock -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyleSheet, Text, View } from 'react-native'; 3 | import Main from './app/containers/main'; 4 | 5 | export default class App extends React.Component { 6 | render() { 7 | return ( 8 |
9 | ); 10 | } 11 | } 12 | 13 | const styles = StyleSheet.create({ 14 | container: { 15 | flex: 1, 16 | backgroundColor: '#fff', 17 | alignItems: 'center', 18 | justifyContent: 'center', 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React Native Weather App 2 | 3 | [![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/codeclimate/codeclimate/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/test_coverage)](https://codeclimate.com/github/codeclimate/codeclimate/test_coverage) 4 | 5 | 6 | 7 | 8 | 9 | This is simple react-native base application which fetch weather using open weather api. This application was build or learning purpose. 10 | 11 | Need Expo to run this app. 12 | 13 | # Installation 14 | Clone the repo 15 | * ``` git clone https://github.com/mhnpd/React-Native-Weather-App.git ``` 16 | 17 | Install Depencencies 18 | * ``` yarn ``` or use npm ``` npm install ``` 19 | 20 | Make sure that you have install expo globally. 21 | 22 | * ``` npm i -g exp ``` 23 | 24 | Lunch the app 25 | * ``` exp start --offline ``` 26 | 27 | You can run it on ios devices 28 | * ``` exp r --tunnel ``` 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | > Make sure android sdk is configure 38 | > properly if you are running this 39 | > application on AVD (android virtual devices.) 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "sdkVersion": "27.0.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | url: 'http://api.openweathermap.org/data/2.5/weather', 3 | appid: 'da9d6e14bf1eddc0eb773a327de2661c', 4 | }; 5 | 6 | export default config; 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Weather", 3 | "version": "0.1.0", 4 | "private": true, 5 | "author":"mohanpd", 6 | "devDependencies": { 7 | "jest-expo": "~27.0.0", 8 | "react-native-scripts": "1.14.0", 9 | "react-test-renderer": "^16.3.2" 10 | }, 11 | "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js", 12 | "scripts": { 13 | "start": "react-native-scripts start", 14 | "eject": "react-native-scripts eject", 15 | "android": "react-native-scripts android", 16 | "ios": "react-native-scripts ios", 17 | "test": "jest" 18 | }, 19 | "jest": { 20 | "preset": "jest-expo" 21 | }, 22 | "dependencies": { 23 | "expo": "^27.0.1", 24 | "react": "16.3.1", 25 | "react-native": "~0.55.2", 26 | "react-native-material-switch": "0.0.4", 27 | "react-native-progress": "^3.2.0", 28 | "react-native-vector-icons": "^4.0.0", 29 | "react-redux": "^5.0.2", 30 | "redux": "^3.6.0", 31 | "redux-actions": "^1.2.0", 32 | "redux-logger": "^2.7.4", 33 | "redux-promise": "^0.5.3", 34 | "redux-thunk": "^2.1.0", 35 | "remote-redux-devtools": "^0.5.7" 36 | } 37 | } 38 | --------------------------------------------------------------------------------