mirror of
https://github.com/zhigang1992/examples.git
synced 2026-01-12 22:47:03 +08:00
refactor(with-react-router): upgrade to sdk 37
This commit is contained in:
14
with-react-router/.gitignore
vendored
14
with-react-router/.gitignore
vendored
@@ -1,14 +0,0 @@
|
||||
node_modules/**/*
|
||||
.expo/*
|
||||
npm-debug.*
|
||||
*.jks
|
||||
*.p8
|
||||
*.p12
|
||||
*.key
|
||||
*.mobileprovision
|
||||
*.orig.*
|
||||
web-build/
|
||||
web-report/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
@@ -1,12 +1,6 @@
|
||||
import React from "react";
|
||||
import { StyleSheet, Text, View, Platform } from "react-native";
|
||||
|
||||
import {
|
||||
Router,
|
||||
Switch,
|
||||
Route,
|
||||
Link
|
||||
} from "./react-router";
|
||||
import { Router, Route, Link } from "./react-router";
|
||||
|
||||
const Home = () => <Text>Home</Text>;
|
||||
|
||||
@@ -38,8 +32,7 @@ const styles = StyleSheet.create({
|
||||
nav:{
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-around',
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
export default App;
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# [React Router Example](https://reacttraining.com/react-router/web/guides/quick-start)
|
||||
|
||||
<p>
|
||||
<!-- Web -->
|
||||
<img alt="Supports Expo Web" longdesc="Supports Expo Web" src="https://img.shields.io/badge/web-4630EB.svg?style=flat-square&logo=GOOGLE-CHROME&labelColor=4285F4&logoColor=fff" />
|
||||
</p>
|
||||
|
||||
React Router is a universal routing solution that you can use with Expo!
|
||||
This demo shows you how to setup your universal application to switch between web and native routers.
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
{
|
||||
"expo": {
|
||||
"name": "with-react-router",
|
||||
"platforms": [
|
||||
"ios",
|
||||
"android",
|
||||
"web"
|
||||
],
|
||||
"version": "1.0.0",
|
||||
"icon": "https://d1wp6m56sqw74a.cloudfront.net/~assets/c9aa1be8a6a6fe81e20c3ac4106a2ebc",
|
||||
"icon": "https://github.com/expo/expo/blob/master/templates/expo-template-blank/assets/icon.png?raw=true",
|
||||
"splash": {
|
||||
"image": "https://d1wp6m56sqw74a.cloudfront.net/~assets/c9aa1be8a6a6fe81e20c3ac4106a2ebc"
|
||||
"image": "https://github.com/expo/expo/blob/master/templates/expo-template-blank/assets/splash.png?raw=true",
|
||||
"resizeMode": "contain",
|
||||
"backgroundColor": "#ffffff"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,17 +5,16 @@
|
||||
"deploy": "npx netlify deploy --dir web-build"
|
||||
},
|
||||
"dependencies": {
|
||||
"expo": "36.0.0",
|
||||
"expo": "37.0.7",
|
||||
"react": "16.9.0",
|
||||
"react-dom": "16.9.0",
|
||||
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
|
||||
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
|
||||
"react-native-web": "0.11.7",
|
||||
"react-router-dom": "5.1.2",
|
||||
"react-router-native": "5.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0",
|
||||
"babel-preset-expo": "8.0.0"
|
||||
},
|
||||
"license": "ISC"
|
||||
"@babel/core": "7.9.0",
|
||||
"babel-preset-expo": "8.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user