From e199336d7800706ab90bd8bbd72ca07052820645 Mon Sep 17 00:00:00 2001 From: Yassine El Bouchaibi Date: Fri, 26 Jun 2020 17:03:58 -0400 Subject: [PATCH] with-maps --- with-maps/App.js | 20 ++++++++++++++++++++ with-maps/README.md | 37 +++++++++++++++++++++++++++++++++++++ with-maps/babel.config.js | 6 ++++++ with-maps/package.json | 13 +++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 with-maps/App.js create mode 100644 with-maps/README.md create mode 100644 with-maps/babel.config.js create mode 100644 with-maps/package.json diff --git a/with-maps/App.js b/with-maps/App.js new file mode 100644 index 0000000..d0e4a5e --- /dev/null +++ b/with-maps/App.js @@ -0,0 +1,20 @@ +import * as React from "react"; +import { View } from "react-native"; +import MapView from 'react-native-maps'; + +export default function App() { + return ( + + + + ); +} \ No newline at end of file diff --git a/with-maps/README.md b/with-maps/README.md new file mode 100644 index 0000000..929ef7a --- /dev/null +++ b/with-maps/README.md @@ -0,0 +1,37 @@ +# Maps Example + +

+ + + Supports Expo iOS + + + + Supports Expo Android + +

+ +## 🚀 How to use + +- Install packages with `yarn` or `npm install`. +- Run `yarn start` or `npm start` to start the bundler. +- Open the project in a React runtime to try it: + - iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779) + - Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample) + +## Adding Native Code + +This project can be run from Expo client app. You may find that you want to add more native code later on. You can do this by ejecting the project and rebuilding it yourself. + +- Run `yarn eject` to create the native projects. +- You can still run your project on Expo client, you just won't be able to access any new native modules you add. + +## Publishing + +- Configure your app to be able to use react-native-maps in production using this guide : [MapView configuration](https://docs.expo.io/versions/v38.0.0/sdk/map-view/#configuration) +- Deploy the native app to the App store and Play store using this guide: [Deployment](https://docs.expo.io/distribution/app-stores/). + +## 📝 Notes + +- Learn more about [MapView](https://docs.expo.io/versions/v38.0.0/sdk/map-view). +- Learn more about [react-native-maps](https://github.com/react-native-community/react-native-maps). diff --git a/with-maps/babel.config.js b/with-maps/babel.config.js new file mode 100644 index 0000000..2900afe --- /dev/null +++ b/with-maps/babel.config.js @@ -0,0 +1,6 @@ +module.exports = function(api) { + api.cache(true); + return { + presets: ['babel-preset-expo'], + }; +}; diff --git a/with-maps/package.json b/with-maps/package.json new file mode 100644 index 0000000..5e8f367 --- /dev/null +++ b/with-maps/package.json @@ -0,0 +1,13 @@ +{ + "dependencies": { + "expo": "~38.0.0", + "react": "~16.11.0", + "react-dom": "~16.11.0", + "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz", + "react-native-web": "0.11.7", + "react-native-maps": "~0.27.1" + }, + "devDependencies": { + "@babel/core": "7.9.0" + } +}