Compare commits
33 Commits
@react-nav
...
@react-nav
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68a334cc93 | ||
|
|
c110570d4c | ||
|
|
d57226fd8b | ||
|
|
c3d3748143 | ||
|
|
8002d51795 | ||
|
|
31cf19912b | ||
|
|
d0e4e1f6fb | ||
|
|
00fc616de0 | ||
|
|
703edb3569 | ||
|
|
38a38b021a | ||
|
|
42bc37d2ff | ||
|
|
75ad2aaae5 | ||
|
|
eef17a801e | ||
|
|
7b8277dae5 | ||
|
|
6cddb5238c | ||
|
|
624ae0ad56 | ||
|
|
458b531859 | ||
|
|
cd1acbf8b5 | ||
|
|
86c1c631aa | ||
|
|
c7e35e0f0d | ||
|
|
b805ba111a | ||
|
|
b6c7d2b626 | ||
|
|
f951e98dc6 | ||
|
|
448fa642ed | ||
|
|
4e0e1f0a15 | ||
|
|
555813a0f4 | ||
|
|
1153feba40 | ||
|
|
e87925c086 | ||
|
|
7b13a81ac8 | ||
|
|
d618ab382e | ||
|
|
c7a5cfd5b2 | ||
|
|
87d445b4e4 | ||
|
|
eaf88478cc |
@@ -35,7 +35,7 @@ Navigators bundle a router and a view which takes the navigation state and decid
|
|||||||
A simple navigator could look like this:
|
A simple navigator could look like this:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { createNavigatorFactory } from '@react-navigation/core';
|
import { createNavigatorFactory } from '@react-navigation/native';
|
||||||
|
|
||||||
function StackNavigator({ initialRouteName, children, ...rest }) {
|
function StackNavigator({ initialRouteName, children, ...rest }) {
|
||||||
// The `navigation` object contains the navigation state and some helpers (e.g. push, pop)
|
// The `navigation` object contains the navigation state and some helpers (e.g. push, pop)
|
||||||
@@ -256,7 +256,7 @@ Sometimes we want to run side-effects when a screen is focused. A side effect ma
|
|||||||
To make this easier, the library exports a `useFocusEffect` hook:
|
To make this easier, the library exports a `useFocusEffect` hook:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { useFocusEffect } from '@react-navigation/core';
|
import { useFocusEffect } from '@react-navigation/native';
|
||||||
|
|
||||||
function Profile({ userId }) {
|
function Profile({ userId }) {
|
||||||
const [user, setUser] = React.useState(null);
|
const [user, setUser] = React.useState(null);
|
||||||
@@ -285,7 +285,7 @@ The `useFocusEffect` is analogous to React's `useEffect` hook. The only differen
|
|||||||
We might want to render different content based on the current focus state of the screen. The library exports a `useIsFocused` hook to make this easier:
|
We might want to render different content based on the current focus state of the screen. The library exports a `useIsFocused` hook to make this easier:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { useIsFocused } from '@react-navigation/core';
|
import { useIsFocused } from '@react-navigation/native';
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
useBuiltIns: 'usage',
|
useBuiltIns: 'usage',
|
||||||
corejs: 3,
|
corejs: 3,
|
||||||
|
targets: {
|
||||||
|
node: 'current',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'@babel/preset-react',
|
'@babel/preset-react',
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:disklrucache:4.9.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:disklrucache:4.9.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:annotations:4.9.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:annotations:4.9.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.react:react-native:0.59.10@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.react:react-native:0.61.5@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:glide:4.9.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:glide:4.9.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-location:16.0.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-location:16.0.0@aar" level="project" />
|
||||||
@@ -177,4 +177,4 @@
|
|||||||
<orderEntry type="module" module-name="unimodules-sensors-interface" />
|
<orderEntry type="module" module-name="unimodules-sensors-interface" />
|
||||||
<orderEntry type="module" module-name="unimodules-task-manager-interface" />
|
<orderEntry type="module" module-name="unimodules-task-manager-interface" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -18,6 +18,9 @@ import com.android.build.OutputFile
|
|||||||
* // the entry file for bundle generation
|
* // the entry file for bundle generation
|
||||||
* entryFile: "index.android.js",
|
* entryFile: "index.android.js",
|
||||||
*
|
*
|
||||||
|
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
|
||||||
|
* bundleCommand: "ram-bundle",
|
||||||
|
*
|
||||||
* // whether to bundle JS and assets in debug mode
|
* // whether to bundle JS and assets in debug mode
|
||||||
* bundleInDebug: false,
|
* bundleInDebug: false,
|
||||||
*
|
*
|
||||||
@@ -73,7 +76,8 @@ import com.android.build.OutputFile
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
project.ext.react = [
|
project.ext.react = [
|
||||||
entryFile: "index.js"
|
entryFile: "index.js",
|
||||||
|
enableHermes: false, // clean and rebuild if changing
|
||||||
]
|
]
|
||||||
|
|
||||||
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
|
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
|
||||||
@@ -88,6 +92,26 @@ apply from: "../../node_modules/react-native/react.gradle"
|
|||||||
* the correct one based on the CPU architecture of their device.
|
* the correct one based on the CPU architecture of their device.
|
||||||
*/
|
*/
|
||||||
def enableSeparateBuildPerCPUArchitecture = false
|
def enableSeparateBuildPerCPUArchitecture = false
|
||||||
|
/**
|
||||||
|
* The preferred build flavor of JavaScriptCore.
|
||||||
|
*
|
||||||
|
* For example, to use the international variant, you can use:
|
||||||
|
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
||||||
|
*
|
||||||
|
* The international variant includes ICU i18n library and necessary data
|
||||||
|
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
||||||
|
* give correct results when using with locales other than en-US. Note that
|
||||||
|
* this variant is about 6MiB larger per architecture than default.
|
||||||
|
*/
|
||||||
|
def jscFlavor = 'org.webkit:android-jsc:+'
|
||||||
|
/**
|
||||||
|
* Whether to enable the Hermes VM.
|
||||||
|
*
|
||||||
|
* This should be set on project.ext.react and mirrored here. If it is not set
|
||||||
|
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
||||||
|
* and the benefits of using Hermes will therefore be sharply reduced.
|
||||||
|
*/
|
||||||
|
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run Proguard to shrink the Java bytecode in release builds.
|
* Run Proguard to shrink the Java bytecode in release builds.
|
||||||
@@ -113,8 +137,22 @@ android {
|
|||||||
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
signingConfigs {
|
||||||
|
debug {
|
||||||
|
storeFile file('debug.keystore')
|
||||||
|
storePassword 'android'
|
||||||
|
keyAlias 'androiddebugkey'
|
||||||
|
keyPassword 'android'
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
release {
|
release {
|
||||||
|
// Caution! In production, you need to generate your own keystore file.
|
||||||
|
// see https://facebook.github.io/react-native/docs/signed-apk-android.
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
minifyEnabled enableProguardInReleaseBuilds
|
minifyEnabled enableProguardInReleaseBuilds
|
||||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||||
}
|
}
|
||||||
@@ -124,7 +162,7 @@ android {
|
|||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
// For each separate APK per architecture, set a unique version code as described here:
|
// For each separate APK per architecture, set a unique version code as described here:
|
||||||
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
||||||
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
|
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
||||||
def abi = output.getFilter(OutputFile.ABI)
|
def abi = output.getFilter(OutputFile.ABI)
|
||||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||||
output.versionCodeOverride =
|
output.versionCodeOverride =
|
||||||
@@ -139,14 +177,17 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':react-native-safe-area-context')
|
|
||||||
implementation project(':react-native-screens')
|
|
||||||
implementation project(':react-native-reanimated')
|
|
||||||
implementation project(':react-native-gesture-handler')
|
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
|
|
||||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||||
addUnimodulesDependencies()
|
addUnimodulesDependencies()
|
||||||
|
|
||||||
|
if (enableHermes) {
|
||||||
|
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||||
|
debugImplementation files(hermesPath + "hermes-debug.aar")
|
||||||
|
releaseImplementation files(hermesPath + "hermes-release.aar")
|
||||||
|
} else {
|
||||||
|
implementation jscFlavor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run this once to be able to run the application with BUCK
|
// Run this once to be able to run the application with BUCK
|
||||||
@@ -155,3 +196,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
|||||||
from configurations.compile
|
from configurations.compile
|
||||||
into 'libs'
|
into 'libs'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||||
BIN
example/android/app/debug.keystore
Normal file
@@ -8,10 +8,3 @@
|
|||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
# Add any project specific keep options here:
|
# Add any project specific keep options here:
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
|
android:usesCleartextTraffic="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@@ -9,7 +9,8 @@ public class MainActivity extends ReactActivity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the main component registered from JavaScript.
|
* Returns the name of the main component registered from JavaScript.
|
||||||
* This is used to schedule rendering of the component.
|
* This is used to schedule
|
||||||
|
* rendering of the component.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String getMainComponentName() {
|
protected String getMainComponentName() {
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.reactnavigationexample;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.content.Context;
|
||||||
|
import com.facebook.react.PackageList;
|
||||||
|
import com.facebook.react.ReactApplication;
|
||||||
|
import com.facebook.react.ReactNativeHost;
|
||||||
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MainApplication extends Application implements ReactApplication {
|
||||||
|
|
||||||
|
private final ReactNativeHost mReactNativeHost =
|
||||||
|
new ReactNativeHost(this) {
|
||||||
|
@Override
|
||||||
|
public boolean getUseDeveloperSupport() {
|
||||||
|
return BuildConfig.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ReactPackage> getPackages() {
|
||||||
|
@SuppressWarnings("UnnecessaryLocalVariable")
|
||||||
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||||
|
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||||
|
// packages.add(new MyReactNativePackage());
|
||||||
|
return packages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getJSMainModuleName() {
|
||||||
|
return "index";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReactNativeHost getReactNativeHost() {
|
||||||
|
return mReactNativeHost;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
SoLoader.init(this, /* native exopackage */ false);
|
||||||
|
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads Flipper in React Native templates.
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
*/
|
||||||
|
private static void initializeFlipper(Context context) {
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
try {
|
||||||
|
/*
|
||||||
|
We use reflection here to pick up the class that initializes Flipper,
|
||||||
|
since Flipper library is not available in release mode
|
||||||
|
*/
|
||||||
|
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
|
||||||
|
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -3,6 +3,7 @@
|
|||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
|
<item name="android:textColor">#000000</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -5,15 +5,14 @@ buildscript {
|
|||||||
buildToolsVersion = "28.0.3"
|
buildToolsVersion = "28.0.3"
|
||||||
minSdkVersion = 21
|
minSdkVersion = 21
|
||||||
compileSdkVersion = 28
|
compileSdkVersion = 28
|
||||||
targetSdkVersion = 27
|
targetSdkVersion = 28
|
||||||
supportLibVersion = "28.0.0"
|
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.3.0'
|
classpath("com.android.tools.build:gradle:3.4.2")
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@@ -23,17 +22,17 @@ buildscript {
|
|||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
google()
|
|
||||||
jcenter()
|
|
||||||
maven {
|
maven {
|
||||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||||
url "$rootDir/../node_modules/react-native/android"
|
url("$rootDir/../node_modules/react-native/android")
|
||||||
}
|
}
|
||||||
|
maven {
|
||||||
|
// Android JSC is installed from npm
|
||||||
|
url("$rootDir/../node_modules/jsc-android/dist")
|
||||||
|
}
|
||||||
|
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
|
||||||
gradleVersion = '4.7'
|
|
||||||
distributionUrl = distributionUrl.replace("bin", "all")
|
|
||||||
}
|
|
||||||
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
|
||||||
7
example/android/settings.gradle
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
apply from: '../node_modules/react-native-unimodules/gradle.groovy'
|
||||||
|
includeUnimodulesProjects()
|
||||||
|
|
||||||
|
|
||||||
|
rootProject.name = 'ReactNavigationExample'
|
||||||
|
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||||
|
include ':app'
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"name": "@react-navigation/example",
|
"name": "@react-navigation/example",
|
||||||
"slug": "react-navigation-example",
|
"slug": "react-navigation-example",
|
||||||
"privacy": "public",
|
"privacy": "public",
|
||||||
"sdkVersion": "35.0.0",
|
"sdkVersion": "36.0.0",
|
||||||
"platforms": [
|
"platforms": [
|
||||||
"ios",
|
"ios",
|
||||||
"android",
|
"android",
|
||||||
@@ -25,7 +25,8 @@
|
|||||||
"ios": {
|
"ios": {
|
||||||
"supportsTablet": true
|
"supportsTablet": true
|
||||||
},
|
},
|
||||||
"entryPoint": "node_modules/expo/AppEntry.js"
|
"entryPoint": "node_modules/expo/AppEntry.js",
|
||||||
|
"description": "Demo app to showcase various functionality of React Navigation"
|
||||||
},
|
},
|
||||||
"displayName": "React Navigation Example",
|
"displayName": "React Navigation Example",
|
||||||
"name": "ReactNavigationExample"
|
"name": "ReactNavigationExample"
|
||||||
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
40
example/ios/Podfile
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
platform :ios, '10.0'
|
||||||
|
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
||||||
|
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
|
||||||
|
|
||||||
|
target 'ReactNavigationExample' do
|
||||||
|
# Pods for ReactNavigationExample
|
||||||
|
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
|
||||||
|
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
|
||||||
|
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
|
||||||
|
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
|
||||||
|
pod 'React', :path => '../node_modules/react-native/'
|
||||||
|
pod 'React-Core', :path => '../node_modules/react-native/'
|
||||||
|
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
|
||||||
|
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
|
||||||
|
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
|
||||||
|
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
|
||||||
|
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
|
||||||
|
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
|
||||||
|
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
|
||||||
|
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
|
||||||
|
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
|
||||||
|
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
|
||||||
|
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
|
||||||
|
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
|
||||||
|
|
||||||
|
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
|
||||||
|
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
|
||||||
|
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
|
||||||
|
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
|
||||||
|
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
|
||||||
|
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
|
||||||
|
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
|
||||||
|
|
||||||
|
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
|
||||||
|
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
|
||||||
|
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||||
|
|
||||||
|
use_native_modules!
|
||||||
|
use_unimodules!
|
||||||
|
end
|
||||||
526
example/ios/Podfile.lock
Normal file
@@ -0,0 +1,526 @@
|
|||||||
|
PODS:
|
||||||
|
- boost-for-react-native (1.63.0)
|
||||||
|
- DoubleConversion (1.1.6)
|
||||||
|
- EXAppLoaderProvider (8.0.0)
|
||||||
|
- EXConstants (8.0.0):
|
||||||
|
- UMConstantsInterface
|
||||||
|
- UMCore
|
||||||
|
- EXErrorRecovery (1.0.0):
|
||||||
|
- UMCore
|
||||||
|
- EXFileSystem (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- UMFileSystemInterface
|
||||||
|
- EXFont (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- UMFontInterface
|
||||||
|
- EXKeepAwake (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- EXLinearGradient (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- EXLocation (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- UMPermissionsInterface
|
||||||
|
- UMTaskManagerInterface
|
||||||
|
- EXPermissions (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- UMPermissionsInterface
|
||||||
|
- EXSQLite (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- UMFileSystemInterface
|
||||||
|
- EXWebBrowser (8.0.0):
|
||||||
|
- UMCore
|
||||||
|
- FBLazyVector (0.61.5)
|
||||||
|
- FBReactNativeSpec (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- RCTRequired (= 0.61.5)
|
||||||
|
- RCTTypeSafety (= 0.61.5)
|
||||||
|
- React-Core (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.61.5)
|
||||||
|
- Folly (2018.10.22.00):
|
||||||
|
- boost-for-react-native
|
||||||
|
- DoubleConversion
|
||||||
|
- Folly/Default (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- Folly/Default (2018.10.22.00):
|
||||||
|
- boost-for-react-native
|
||||||
|
- DoubleConversion
|
||||||
|
- glog
|
||||||
|
- glog (0.3.5)
|
||||||
|
- RCTRequired (0.61.5)
|
||||||
|
- RCTTypeSafety (0.61.5):
|
||||||
|
- FBLazyVector (= 0.61.5)
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- RCTRequired (= 0.61.5)
|
||||||
|
- React-Core (= 0.61.5)
|
||||||
|
- React (0.61.5):
|
||||||
|
- React-Core (= 0.61.5)
|
||||||
|
- React-Core/DevSupport (= 0.61.5)
|
||||||
|
- React-Core/RCTWebSocket (= 0.61.5)
|
||||||
|
- React-RCTActionSheet (= 0.61.5)
|
||||||
|
- React-RCTAnimation (= 0.61.5)
|
||||||
|
- React-RCTBlob (= 0.61.5)
|
||||||
|
- React-RCTImage (= 0.61.5)
|
||||||
|
- React-RCTLinking (= 0.61.5)
|
||||||
|
- React-RCTNetwork (= 0.61.5)
|
||||||
|
- React-RCTSettings (= 0.61.5)
|
||||||
|
- React-RCTText (= 0.61.5)
|
||||||
|
- React-RCTVibration (= 0.61.5)
|
||||||
|
- React-Core (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default (= 0.61.5)
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/CoreModulesHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/Default (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/DevSupport (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default (= 0.61.5)
|
||||||
|
- React-Core/RCTWebSocket (= 0.61.5)
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- React-jsinspector (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTActionSheetHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTAnimationHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTBlobHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTImageHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTLinkingHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTNetworkHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTSettingsHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTTextHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTVibrationHeaders (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-Core/RCTWebSocket (0.61.5):
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core/Default (= 0.61.5)
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsiexecutor (= 0.61.5)
|
||||||
|
- Yoga
|
||||||
|
- React-CoreModules (0.61.5):
|
||||||
|
- FBReactNativeSpec (= 0.61.5)
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- RCTTypeSafety (= 0.61.5)
|
||||||
|
- React-Core/CoreModulesHeaders (= 0.61.5)
|
||||||
|
- React-RCTImage (= 0.61.5)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.61.5)
|
||||||
|
- React-cxxreact (0.61.5):
|
||||||
|
- boost-for-react-native (= 1.63.0)
|
||||||
|
- DoubleConversion
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-jsinspector (= 0.61.5)
|
||||||
|
- React-jsi (0.61.5):
|
||||||
|
- boost-for-react-native (= 1.63.0)
|
||||||
|
- DoubleConversion
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-jsi/Default (= 0.61.5)
|
||||||
|
- React-jsi/Default (0.61.5):
|
||||||
|
- boost-for-react-native (= 1.63.0)
|
||||||
|
- DoubleConversion
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-jsiexecutor (0.61.5):
|
||||||
|
- DoubleConversion
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-jsinspector (0.61.5)
|
||||||
|
- react-native-safe-area-context (0.6.1):
|
||||||
|
- React
|
||||||
|
- React-RCTActionSheet (0.61.5):
|
||||||
|
- React-Core/RCTActionSheetHeaders (= 0.61.5)
|
||||||
|
- React-RCTAnimation (0.61.5):
|
||||||
|
- React-Core/RCTAnimationHeaders (= 0.61.5)
|
||||||
|
- React-RCTBlob (0.61.5):
|
||||||
|
- React-Core/RCTBlobHeaders (= 0.61.5)
|
||||||
|
- React-Core/RCTWebSocket (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- React-RCTNetwork (= 0.61.5)
|
||||||
|
- React-RCTImage (0.61.5):
|
||||||
|
- React-Core/RCTImageHeaders (= 0.61.5)
|
||||||
|
- React-RCTNetwork (= 0.61.5)
|
||||||
|
- React-RCTLinking (0.61.5):
|
||||||
|
- React-Core/RCTLinkingHeaders (= 0.61.5)
|
||||||
|
- React-RCTNetwork (0.61.5):
|
||||||
|
- React-Core/RCTNetworkHeaders (= 0.61.5)
|
||||||
|
- React-RCTSettings (0.61.5):
|
||||||
|
- React-Core/RCTSettingsHeaders (= 0.61.5)
|
||||||
|
- React-RCTText (0.61.5):
|
||||||
|
- React-Core/RCTTextHeaders (= 0.61.5)
|
||||||
|
- React-RCTVibration (0.61.5):
|
||||||
|
- React-Core/RCTVibrationHeaders (= 0.61.5)
|
||||||
|
- ReactCommon/jscallinvoker (0.61.5):
|
||||||
|
- DoubleConversion
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- ReactCommon/turbomodule/core (0.61.5):
|
||||||
|
- DoubleConversion
|
||||||
|
- Folly (= 2018.10.22.00)
|
||||||
|
- glog
|
||||||
|
- React-Core (= 0.61.5)
|
||||||
|
- React-cxxreact (= 0.61.5)
|
||||||
|
- React-jsi (= 0.61.5)
|
||||||
|
- ReactCommon/jscallinvoker (= 0.61.5)
|
||||||
|
- RNCMaskedView (0.1.5):
|
||||||
|
- React
|
||||||
|
- RNGestureHandler (1.5.2):
|
||||||
|
- React
|
||||||
|
- RNReanimated (1.4.0):
|
||||||
|
- React
|
||||||
|
- RNScreens (2.0.0-alpha.17):
|
||||||
|
- React
|
||||||
|
- UMBarCodeScannerInterface (5.0.0)
|
||||||
|
- UMCameraInterface (5.0.0)
|
||||||
|
- UMConstantsInterface (5.0.0)
|
||||||
|
- UMCore (5.0.0)
|
||||||
|
- UMFaceDetectorInterface (5.0.0)
|
||||||
|
- UMFileSystemInterface (5.0.0)
|
||||||
|
- UMFontInterface (5.0.0)
|
||||||
|
- UMImageLoaderInterface (5.0.0)
|
||||||
|
- UMPermissionsInterface (5.0.0)
|
||||||
|
- UMReactNativeAdapter (5.0.0):
|
||||||
|
- React-Core
|
||||||
|
- UMCore
|
||||||
|
- UMFontInterface
|
||||||
|
- UMSensorsInterface (5.0.0)
|
||||||
|
- UMTaskManagerInterface (5.0.0)
|
||||||
|
- Yoga (1.14.0)
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
||||||
|
- EXAppLoaderProvider (from `../node_modules/expo/node_modules/expo-app-loader-provider/ios`)
|
||||||
|
- EXConstants (from `../node_modules/expo/node_modules/expo-constants/ios`)
|
||||||
|
- EXErrorRecovery (from `../node_modules/expo-error-recovery/ios`)
|
||||||
|
- EXFileSystem (from `../node_modules/expo/node_modules/expo-file-system/ios`)
|
||||||
|
- EXFont (from `../node_modules/expo-font/ios`)
|
||||||
|
- EXKeepAwake (from `../node_modules/expo-keep-awake/ios`)
|
||||||
|
- EXLinearGradient (from `../node_modules/expo-linear-gradient/ios`)
|
||||||
|
- EXLocation (from `../node_modules/expo-location/ios`)
|
||||||
|
- EXPermissions (from `../node_modules/expo/node_modules/expo-permissions/ios`)
|
||||||
|
- EXSQLite (from `../node_modules/expo-sqlite/ios`)
|
||||||
|
- EXWebBrowser (from `../node_modules/expo-web-browser/ios`)
|
||||||
|
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
|
||||||
|
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
|
||||||
|
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
|
||||||
|
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||||
|
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
|
||||||
|
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
|
||||||
|
- React (from `../node_modules/react-native/`)
|
||||||
|
- React-Core (from `../node_modules/react-native/`)
|
||||||
|
- React-Core/DevSupport (from `../node_modules/react-native/`)
|
||||||
|
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
|
||||||
|
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
|
||||||
|
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
|
||||||
|
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
|
||||||
|
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
|
||||||
|
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
|
||||||
|
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
|
||||||
|
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
||||||
|
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
||||||
|
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
|
||||||
|
- React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
|
||||||
|
- React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
|
||||||
|
- React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
|
||||||
|
- React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
|
||||||
|
- React-RCTText (from `../node_modules/react-native/Libraries/Text`)
|
||||||
|
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
|
||||||
|
- ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
|
||||||
|
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
|
||||||
|
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
|
||||||
|
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
|
||||||
|
- RNReanimated (from `../node_modules/react-native-reanimated`)
|
||||||
|
- RNScreens (from `../node_modules/react-native-screens`)
|
||||||
|
- UMBarCodeScannerInterface (from `../node_modules/expo/node_modules/unimodules-barcode-scanner-interface/ios`)
|
||||||
|
- UMCameraInterface (from `../node_modules/expo/node_modules/unimodules-camera-interface/ios`)
|
||||||
|
- UMConstantsInterface (from `../node_modules/expo/node_modules/unimodules-constants-interface/ios`)
|
||||||
|
- "UMCore (from `../node_modules/expo/node_modules/@unimodules/core/ios`)"
|
||||||
|
- UMFaceDetectorInterface (from `../node_modules/expo/node_modules/unimodules-face-detector-interface/ios`)
|
||||||
|
- UMFileSystemInterface (from `../node_modules/expo/node_modules/unimodules-file-system-interface/ios`)
|
||||||
|
- UMFontInterface (from `../node_modules/expo/node_modules/unimodules-font-interface/ios`)
|
||||||
|
- UMImageLoaderInterface (from `../node_modules/expo/node_modules/unimodules-image-loader-interface/ios`)
|
||||||
|
- UMPermissionsInterface (from `../node_modules/expo/node_modules/unimodules-permissions-interface/ios`)
|
||||||
|
- "UMReactNativeAdapter (from `../node_modules/expo/node_modules/@unimodules/react-native-adapter/ios`)"
|
||||||
|
- UMSensorsInterface (from `../node_modules/expo/node_modules/unimodules-sensors-interface/ios`)
|
||||||
|
- UMTaskManagerInterface (from `../node_modules/expo/node_modules/unimodules-task-manager-interface/ios`)
|
||||||
|
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- boost-for-react-native
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
DoubleConversion:
|
||||||
|
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
|
||||||
|
EXAppLoaderProvider:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/expo-app-loader-provider/ios"
|
||||||
|
EXConstants:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/expo-constants/ios"
|
||||||
|
EXErrorRecovery:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo-error-recovery/ios"
|
||||||
|
EXFileSystem:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/expo-file-system/ios"
|
||||||
|
EXFont:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo-font/ios"
|
||||||
|
EXKeepAwake:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo-keep-awake/ios"
|
||||||
|
EXLinearGradient:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo-linear-gradient/ios"
|
||||||
|
EXLocation:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo-location/ios"
|
||||||
|
EXPermissions:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/expo-permissions/ios"
|
||||||
|
EXSQLite:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo-sqlite/ios"
|
||||||
|
EXWebBrowser:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo-web-browser/ios"
|
||||||
|
FBLazyVector:
|
||||||
|
:path: "../node_modules/react-native/Libraries/FBLazyVector"
|
||||||
|
FBReactNativeSpec:
|
||||||
|
:path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
|
||||||
|
Folly:
|
||||||
|
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
|
||||||
|
glog:
|
||||||
|
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
|
||||||
|
RCTRequired:
|
||||||
|
:path: "../node_modules/react-native/Libraries/RCTRequired"
|
||||||
|
RCTTypeSafety:
|
||||||
|
:path: "../node_modules/react-native/Libraries/TypeSafety"
|
||||||
|
React:
|
||||||
|
:path: "../node_modules/react-native/"
|
||||||
|
React-Core:
|
||||||
|
:path: "../node_modules/react-native/"
|
||||||
|
React-CoreModules:
|
||||||
|
:path: "../node_modules/react-native/React/CoreModules"
|
||||||
|
React-cxxreact:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon/cxxreact"
|
||||||
|
React-jsi:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon/jsi"
|
||||||
|
React-jsiexecutor:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
|
||||||
|
React-jsinspector:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon/jsinspector"
|
||||||
|
react-native-safe-area-context:
|
||||||
|
:path: "../node_modules/react-native-safe-area-context"
|
||||||
|
React-RCTActionSheet:
|
||||||
|
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
|
||||||
|
React-RCTAnimation:
|
||||||
|
:path: "../node_modules/react-native/Libraries/NativeAnimation"
|
||||||
|
React-RCTBlob:
|
||||||
|
:path: "../node_modules/react-native/Libraries/Blob"
|
||||||
|
React-RCTImage:
|
||||||
|
:path: "../node_modules/react-native/Libraries/Image"
|
||||||
|
React-RCTLinking:
|
||||||
|
:path: "../node_modules/react-native/Libraries/LinkingIOS"
|
||||||
|
React-RCTNetwork:
|
||||||
|
:path: "../node_modules/react-native/Libraries/Network"
|
||||||
|
React-RCTSettings:
|
||||||
|
:path: "../node_modules/react-native/Libraries/Settings"
|
||||||
|
React-RCTText:
|
||||||
|
:path: "../node_modules/react-native/Libraries/Text"
|
||||||
|
React-RCTVibration:
|
||||||
|
:path: "../node_modules/react-native/Libraries/Vibration"
|
||||||
|
ReactCommon:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon"
|
||||||
|
RNCMaskedView:
|
||||||
|
:path: "../node_modules/@react-native-community/masked-view"
|
||||||
|
RNGestureHandler:
|
||||||
|
:path: "../node_modules/react-native-gesture-handler"
|
||||||
|
RNReanimated:
|
||||||
|
:path: "../node_modules/react-native-reanimated"
|
||||||
|
RNScreens:
|
||||||
|
:path: "../node_modules/react-native-screens"
|
||||||
|
UMBarCodeScannerInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-barcode-scanner-interface/ios"
|
||||||
|
UMCameraInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-camera-interface/ios"
|
||||||
|
UMConstantsInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-constants-interface/ios"
|
||||||
|
UMCore:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/@unimodules/core/ios"
|
||||||
|
UMFaceDetectorInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-face-detector-interface/ios"
|
||||||
|
UMFileSystemInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-file-system-interface/ios"
|
||||||
|
UMFontInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-font-interface/ios"
|
||||||
|
UMImageLoaderInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-image-loader-interface/ios"
|
||||||
|
UMPermissionsInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-permissions-interface/ios"
|
||||||
|
UMReactNativeAdapter:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/@unimodules/react-native-adapter/ios"
|
||||||
|
UMSensorsInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-sensors-interface/ios"
|
||||||
|
UMTaskManagerInterface:
|
||||||
|
:path: !ruby/object:Pathname
|
||||||
|
path: "../node_modules/expo/node_modules/unimodules-task-manager-interface/ios"
|
||||||
|
Yoga:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon/yoga"
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||||
|
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
|
||||||
|
EXAppLoaderProvider: ebdb6bc2632c1ccadbe49f5e4104d8d690969c49
|
||||||
|
EXConstants: 4051b16c17ef3defa03c541d42811dc92b249146
|
||||||
|
EXErrorRecovery: d36db99ec6a3808f313f01b0890eb443796dd1c2
|
||||||
|
EXFileSystem: 6e0d9bb6cc4ea404dbb8f583c1a8a2dcdf4b83b6
|
||||||
|
EXFont: 6187b5ab46ee578d5f8e7f2ea092752e78772235
|
||||||
|
EXKeepAwake: 66e9f80b6d129633725a0e42f8d285c229876811
|
||||||
|
EXLinearGradient: 75f302f9d6484267a3f6d3252df2e7a5f00e716a
|
||||||
|
EXLocation: 3c75d012ca92eed94d4338778d79c49d1252393a
|
||||||
|
EXPermissions: 9bc08859a675d291e89be9a0870155c27c16ac35
|
||||||
|
EXSQLite: 220226a354912b100dfe913f5fe6f31762c8927e
|
||||||
|
EXWebBrowser: db32607359fb7b55b7b7b91df32dd3d8355bb3b7
|
||||||
|
FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
|
||||||
|
FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
|
||||||
|
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
|
||||||
|
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
|
||||||
|
RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
|
||||||
|
RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
|
||||||
|
React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
|
||||||
|
React-Core: 688b451f7d616cc1134ac95295b593d1b5158a04
|
||||||
|
React-CoreModules: d04f8494c1a328b69ec11db9d1137d667f916dcb
|
||||||
|
React-cxxreact: d0f7bcafa196ae410e5300736b424455e7fb7ba7
|
||||||
|
React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
|
||||||
|
React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
|
||||||
|
React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
|
||||||
|
react-native-safe-area-context: 1f8a52fb0ab1321eef9a7099bd2c360d4e38264b
|
||||||
|
React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
|
||||||
|
React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
|
||||||
|
React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72
|
||||||
|
React-RCTImage: 6b8e8df449eb7c814c99a92d6b52de6fe39dea4e
|
||||||
|
React-RCTLinking: 121bb231c7503cf9094f4d8461b96a130fabf4a5
|
||||||
|
React-RCTNetwork: fb353640aafcee84ca8b78957297bd395f065c9a
|
||||||
|
React-RCTSettings: 8db258ea2a5efee381fcf7a6d5044e2f8b68b640
|
||||||
|
React-RCTText: 9ccc88273e9a3aacff5094d2175a605efa854dbe
|
||||||
|
React-RCTVibration: a49a1f42bf8f5acf1c3e297097517c6b3af377ad
|
||||||
|
ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
|
||||||
|
RNCMaskedView: dd13f9f7b146a9ad82f9b7eb6c9b5548fcf6e990
|
||||||
|
RNGestureHandler: 946a7691e41df61e2c4b1884deab41a4cdc3afff
|
||||||
|
RNReanimated: b2ab0b693dddd2339bd2f300e770f6302d2e960c
|
||||||
|
RNScreens: f5e2ff7ccde2a1bfcf2a48c6fd07fdcf1fd95223
|
||||||
|
UMBarCodeScannerInterface: 3802c8574ef119c150701d679ab386e2266d6a54
|
||||||
|
UMCameraInterface: 985d301f688ed392f815728f0dd906ca34b7ccb1
|
||||||
|
UMConstantsInterface: bda5f8bd3403ad99e663eb3c4da685d063c5653c
|
||||||
|
UMCore: 7ab08669a8bb2e61f557c1fe9784521cb5aa28e3
|
||||||
|
UMFaceDetectorInterface: ce14e8e597f6a52aa66e4ab956cb5bff4fa8acf8
|
||||||
|
UMFileSystemInterface: 2ed004c9620f43f0b36b33c42ce668500850d6a4
|
||||||
|
UMFontInterface: 24fbc0a02ade6c60ad3ee3e2b5d597c8dcfc3208
|
||||||
|
UMImageLoaderInterface: 3976a14c588341228881ff75970fbabf122efca4
|
||||||
|
UMPermissionsInterface: 2abf9f7f4aa7110e27beaf634a7deda2d50ff3d7
|
||||||
|
UMReactNativeAdapter: 230406e3335a8dbd4c9c0e654488a1cf3b44552f
|
||||||
|
UMSensorsInterface: d708a892ef1500bdd9fc3ff03f7836c66d1634d3
|
||||||
|
UMTaskManagerInterface: a98e37a576a5220bf43b8faf33cfdc129d2f441d
|
||||||
|
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 18b58708b4bb9901516029103ee63c94d63edd9e
|
||||||
|
|
||||||
|
COCOAPODS: 1.8.4
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 208 B |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
|
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 982 B |
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
|
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 894 B |
|
Before Width: | Height: | Size: 748 B After Width: | Height: | Size: 748 B |
|
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 713 B |
|
Before Width: | Height: | Size: 1017 B After Width: | Height: | Size: 1017 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
82
example/metro.config.js
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const fs = require('fs');
|
||||||
|
const escape = require('escape-string-regexp');
|
||||||
|
const blacklist = require('metro-config/src/defaults/blacklist');
|
||||||
|
|
||||||
|
const root = path.resolve(__dirname, '..');
|
||||||
|
const packages = path.resolve(__dirname, '..', 'packages');
|
||||||
|
|
||||||
|
const modules = ['@babel/runtime', '@expo/vector-icons']
|
||||||
|
.concat(
|
||||||
|
...fs
|
||||||
|
.readdirSync(packages)
|
||||||
|
.filter(p => !p.startsWith('.'))
|
||||||
|
.map(p => {
|
||||||
|
const pak = JSON.parse(
|
||||||
|
fs.readFileSync(path.join(packages, p, 'package.json'), 'utf8')
|
||||||
|
);
|
||||||
|
|
||||||
|
const deps = [];
|
||||||
|
|
||||||
|
if (pak.dependencies) {
|
||||||
|
deps.push(...Object.keys(pak.dependencies));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pak.peerDependencies) {
|
||||||
|
deps.push(...Object.keys(pak.peerDependencies));
|
||||||
|
}
|
||||||
|
|
||||||
|
return deps;
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.sort()
|
||||||
|
.filter(
|
||||||
|
(m, i, self) =>
|
||||||
|
self.lastIndexOf(m) === i && !m.startsWith('@react-navigation/')
|
||||||
|
);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
projectRoot: __dirname,
|
||||||
|
watchFolders: [root],
|
||||||
|
|
||||||
|
resolver: {
|
||||||
|
blacklistRE: blacklist(
|
||||||
|
[root, ...fs.readdirSync(packages).map(p => path.join(packages, p))].map(
|
||||||
|
it => new RegExp(`^${escape(path.join(it, 'node_modules'))}\\/.*$`)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
extraNodeModules: modules.reduce((acc, name) => {
|
||||||
|
acc[name] = path.join(__dirname, 'node_modules', name);
|
||||||
|
return acc;
|
||||||
|
}, {}),
|
||||||
|
},
|
||||||
|
|
||||||
|
server: {
|
||||||
|
enhanceMiddleware: middleware => {
|
||||||
|
return (req, res, next) => {
|
||||||
|
const assets = '/packages/stack/src/views/assets';
|
||||||
|
|
||||||
|
if (req.url.startsWith(assets)) {
|
||||||
|
req.url = req.url.replace(
|
||||||
|
assets,
|
||||||
|
'/assets/../packages/stack/src/views/assets'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return middleware(req, res, next);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
transformer: {
|
||||||
|
getTransformOptions: async () => ({
|
||||||
|
transform: {
|
||||||
|
experimentalImportSupport: false,
|
||||||
|
inlineRequires: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -12,28 +12,28 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "expo start",
|
"start": "expo start",
|
||||||
"web": "expo start --web",
|
"web": "expo start --web",
|
||||||
"native": "react-native start",
|
"react-native": "./node_modules/.bin/react-native",
|
||||||
"android": "react-native run-android",
|
"native": "./node_modules/.bin/react-native start",
|
||||||
"ios": "react-native run-ios",
|
"android": "./node_modules/.bin/react-native run-android",
|
||||||
"postinstall": "jetify"
|
"ios": "./node_modules/.bin/react-native run-ios"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/vector-icons": "^10.0.5",
|
"@expo/vector-icons": "^10.0.0",
|
||||||
"@react-native-community/masked-view": "^0.1.5",
|
"@react-native-community/masked-view": "0.1.5",
|
||||||
"expo": "^35.0.1",
|
"color": "^3.1.2",
|
||||||
"expo-asset": "~7.0.0",
|
"expo": "^36.0.0",
|
||||||
|
"expo-asset": "~8.0.0",
|
||||||
"query-string": "^6.9.0",
|
"query-string": "^6.9.0",
|
||||||
"react": "~16.8.3",
|
"react": "~16.9.0",
|
||||||
"react-dom": "~16.8.3",
|
"react-dom": "~16.9.0",
|
||||||
"react-native": "~0.59.10",
|
"react-native": "~0.61.5",
|
||||||
"react-native-gesture-handler": "~1.5.0",
|
"react-native-gesture-handler": "~1.5.0",
|
||||||
"react-native-paper": "^3.2.1",
|
"react-native-paper": "^3.2.1",
|
||||||
"react-native-reanimated": "~1.2.0",
|
"react-native-reanimated": "^1.4.0",
|
||||||
"react-native-reanimated-web": "npm:react-native-reanimated@^1.3.2",
|
"react-native-safe-area-context": "^0.6.0",
|
||||||
"react-native-safe-area-context": "~0.6.0",
|
"react-native-screens": "^2.0.0-alpha.12",
|
||||||
"react-native-screens": "^2.0.0-alpha.11",
|
|
||||||
"react-native-tab-view": "2.11.0",
|
"react-native-tab-view": "2.11.0",
|
||||||
"react-native-unimodules": "^0.7.0-rc.1",
|
"react-native-unimodules": "^0.6.0",
|
||||||
"react-native-web": "^0.11.7",
|
"react-native-web": "^0.11.7",
|
||||||
"scheduler": "^0.18.0",
|
"scheduler": "^0.18.0",
|
||||||
"shortid": "^2.2.15",
|
"shortid": "^2.2.15",
|
||||||
@@ -46,7 +46,6 @@
|
|||||||
"@types/react-native": "^0.60.22",
|
"@types/react-native": "^0.60.22",
|
||||||
"babel-preset-expo": "^7.1.0",
|
"babel-preset-expo": "^7.1.0",
|
||||||
"expo-cli": "^3.8.0",
|
"expo-cli": "^3.8.0",
|
||||||
"jetifier": "^1.6.4",
|
|
||||||
"typescript": "^3.7.2"
|
"typescript": "^3.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
186
example/src/Screens/AuthFlow.tsx
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import { View, TextInput, ActivityIndicator, StyleSheet } from 'react-native';
|
||||||
|
import { Title, Button } from 'react-native-paper';
|
||||||
|
import { ParamListBase } from '@react-navigation/native';
|
||||||
|
import {
|
||||||
|
createStackNavigator,
|
||||||
|
HeaderBackButton,
|
||||||
|
StackNavigationProp,
|
||||||
|
} from '@react-navigation/stack';
|
||||||
|
|
||||||
|
type AuthStackParams = {
|
||||||
|
Splash: undefined;
|
||||||
|
Home: undefined;
|
||||||
|
SignIn: undefined;
|
||||||
|
PostSignOut: undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
const AUTH_CONTEXT_ERROR =
|
||||||
|
'Authentication context not found. Have your wrapped your components with AuthContext.Consumer?';
|
||||||
|
|
||||||
|
const AuthContext = React.createContext<{
|
||||||
|
signIn: () => void;
|
||||||
|
signOut: () => void;
|
||||||
|
}>({
|
||||||
|
signIn: () => {
|
||||||
|
throw new Error(AUTH_CONTEXT_ERROR);
|
||||||
|
},
|
||||||
|
signOut: () => {
|
||||||
|
throw new Error(AUTH_CONTEXT_ERROR);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const SplashScreen = () => {
|
||||||
|
return (
|
||||||
|
<View style={styles.content}>
|
||||||
|
<ActivityIndicator />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const SignInScreen = () => {
|
||||||
|
const { signIn } = React.useContext(AuthContext);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={styles.content}>
|
||||||
|
<TextInput placeholder="Username" style={styles.input} />
|
||||||
|
<TextInput placeholder="Password" secureTextEntry style={styles.input} />
|
||||||
|
<Button mode="contained" onPress={signIn} style={styles.button}>
|
||||||
|
Sign in
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const HomeScreen = () => {
|
||||||
|
const { signOut } = React.useContext(AuthContext);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={styles.content}>
|
||||||
|
<Title style={styles.text}>Signed in successfully 🎉</Title>
|
||||||
|
<Button onPress={signOut} style={styles.button}>
|
||||||
|
Sign out
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const SimpleStack = createStackNavigator<AuthStackParams>();
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
navigation: StackNavigationProp<ParamListBase>;
|
||||||
|
};
|
||||||
|
|
||||||
|
type State = {
|
||||||
|
isLoading: boolean;
|
||||||
|
userToken: undefined | string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type Action =
|
||||||
|
| { type: 'RESTORE_TOKEN'; token: undefined | string }
|
||||||
|
| { type: 'SIGN_IN'; token: string }
|
||||||
|
| { type: 'SIGN_OUT' };
|
||||||
|
|
||||||
|
export default function SimpleStackScreen({ navigation }: Props) {
|
||||||
|
const [state, dispatch] = React.useReducer<React.Reducer<State, Action>>(
|
||||||
|
(prevState, action) => {
|
||||||
|
switch (action.type) {
|
||||||
|
case 'RESTORE_TOKEN':
|
||||||
|
return {
|
||||||
|
...prevState,
|
||||||
|
userToken: action.token,
|
||||||
|
isLoading: false,
|
||||||
|
};
|
||||||
|
case 'SIGN_IN':
|
||||||
|
return {
|
||||||
|
...prevState,
|
||||||
|
userToken: action.token,
|
||||||
|
};
|
||||||
|
case 'SIGN_OUT':
|
||||||
|
return {
|
||||||
|
...prevState,
|
||||||
|
userToken: undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
isLoading: true,
|
||||||
|
userToken: undefined,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
dispatch({ type: 'RESTORE_TOKEN', token: undefined });
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
return () => clearTimeout(timer);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
navigation.setOptions({
|
||||||
|
headerShown: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const authContext = React.useMemo(
|
||||||
|
() => ({
|
||||||
|
signIn: () => dispatch({ type: 'SIGN_IN', token: 'dummy-auth-token' }),
|
||||||
|
signOut: () => dispatch({ type: 'SIGN_OUT' }),
|
||||||
|
}),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AuthContext.Provider value={authContext}>
|
||||||
|
<SimpleStack.Navigator
|
||||||
|
screenOptions={{
|
||||||
|
headerLeft: () => (
|
||||||
|
<HeaderBackButton onPress={() => navigation.goBack()} />
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{state.isLoading ? (
|
||||||
|
<SimpleStack.Screen
|
||||||
|
name="Splash"
|
||||||
|
component={SplashScreen}
|
||||||
|
options={{ title: 'Auth Flow' }}
|
||||||
|
/>
|
||||||
|
) : state.userToken === undefined ? (
|
||||||
|
<SimpleStack.Screen
|
||||||
|
name="SignIn"
|
||||||
|
options={{ title: 'Sign in' }}
|
||||||
|
component={SignInScreen}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<SimpleStack.Screen
|
||||||
|
name="Home"
|
||||||
|
options={{ title: 'Home' }}
|
||||||
|
component={HomeScreen}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</SimpleStack.Navigator>
|
||||||
|
</AuthContext.Provider>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
content: {
|
||||||
|
flex: 1,
|
||||||
|
padding: 16,
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
input: {
|
||||||
|
margin: 8,
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: 3,
|
||||||
|
borderWidth: StyleSheet.hairlineWidth,
|
||||||
|
borderColor: 'rgba(0, 0, 0, 0.08)',
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
margin: 8,
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
textAlign: 'center',
|
||||||
|
margin: 8,
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { StyleSheet } from 'react-native';
|
|
||||||
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
|
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
|
||||||
import Albums from '../Shared/Albums';
|
import Albums from '../Shared/Albums';
|
||||||
import Contacts from '../Shared/Contacts';
|
import Contacts from '../Shared/Contacts';
|
||||||
@@ -15,13 +14,7 @@ const MaterialTopTabs = createMaterialTopTabNavigator<MaterialTopTabParams>();
|
|||||||
|
|
||||||
export default function MaterialTopTabsScreen() {
|
export default function MaterialTopTabsScreen() {
|
||||||
return (
|
return (
|
||||||
<MaterialTopTabs.Navigator
|
<MaterialTopTabs.Navigator>
|
||||||
tabBarOptions={{
|
|
||||||
style: styles.tabBar,
|
|
||||||
labelStyle: styles.tabLabel,
|
|
||||||
indicatorStyle: styles.tabIndicator,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<MaterialTopTabs.Screen
|
<MaterialTopTabs.Screen
|
||||||
name="chat"
|
name="chat"
|
||||||
component={Chat}
|
component={Chat}
|
||||||
@@ -40,15 +33,3 @@ export default function MaterialTopTabsScreen() {
|
|||||||
</MaterialTopTabs.Navigator>
|
</MaterialTopTabs.Navigator>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
tabBar: {
|
|
||||||
backgroundColor: 'white',
|
|
||||||
},
|
|
||||||
tabLabel: {
|
|
||||||
color: 'black',
|
|
||||||
},
|
|
||||||
tabIndicator: {
|
|
||||||
backgroundColor: 'tomato',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|||||||
import { View, StyleSheet } from 'react-native';
|
import { View, StyleSheet } from 'react-native';
|
||||||
import { Button } from 'react-native-paper';
|
import { Button } from 'react-native-paper';
|
||||||
import { useSafeArea } from 'react-native-safe-area-context';
|
import { useSafeArea } from 'react-native-safe-area-context';
|
||||||
import { RouteProp, ParamListBase } from '@react-navigation/core';
|
import { RouteProp, ParamListBase } from '@react-navigation/native';
|
||||||
import {
|
import {
|
||||||
createStackNavigator,
|
createStackNavigator,
|
||||||
StackNavigationProp,
|
StackNavigationProp,
|
||||||
233
example/src/Screens/NativeStack.tsx
Normal file
@@ -0,0 +1,233 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import { View, Text, ScrollView, StyleSheet } from 'react-native';
|
||||||
|
import { Button } from 'react-native-paper';
|
||||||
|
// eslint-disable-next-line import/no-unresolved
|
||||||
|
import { enableScreens } from 'react-native-screens';
|
||||||
|
import {
|
||||||
|
RouteProp,
|
||||||
|
ParamListBase,
|
||||||
|
useFocusEffect,
|
||||||
|
useTheme,
|
||||||
|
} from '@react-navigation/native';
|
||||||
|
import { DrawerNavigationProp } from '@react-navigation/drawer';
|
||||||
|
import { StackNavigationProp } from '@react-navigation/stack';
|
||||||
|
import {
|
||||||
|
createNativeStackNavigator,
|
||||||
|
NativeStackNavigationProp,
|
||||||
|
} from '@react-navigation/native-stack';
|
||||||
|
import Albums from '../Shared/Albums';
|
||||||
|
|
||||||
|
type NativeStackParams = {
|
||||||
|
article: { author: string };
|
||||||
|
album: undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
type NativeStackNavigation = NativeStackNavigationProp<NativeStackParams>;
|
||||||
|
|
||||||
|
const Title = ({ children }: { children: React.ReactNode }) => {
|
||||||
|
const { colors } = useTheme();
|
||||||
|
|
||||||
|
return <Text style={[styles.title, { color: colors.text }]}>{children}</Text>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const Paragraph = ({ children }: { children: React.ReactNode }) => {
|
||||||
|
const { colors } = useTheme();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Text style={[styles.paragraph, { color: colors.text }]}>{children}</Text>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ArticleScreen = ({
|
||||||
|
navigation,
|
||||||
|
}: {
|
||||||
|
navigation: NativeStackNavigation;
|
||||||
|
route: RouteProp<NativeStackParams, 'article'>;
|
||||||
|
}) => {
|
||||||
|
const { colors } = useTheme();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ScrollView
|
||||||
|
style={{ backgroundColor: colors.card }}
|
||||||
|
contentContainerStyle={styles.content}
|
||||||
|
>
|
||||||
|
<View style={styles.buttons}>
|
||||||
|
<Button
|
||||||
|
mode="contained"
|
||||||
|
onPress={() => navigation.push('album')}
|
||||||
|
style={styles.button}
|
||||||
|
>
|
||||||
|
Push album
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
mode="outlined"
|
||||||
|
onPress={() => navigation.goBack()}
|
||||||
|
style={styles.button}
|
||||||
|
>
|
||||||
|
Go back
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
<Title>What is Lorem Ipsum?</Title>
|
||||||
|
<Paragraph>
|
||||||
|
Lorem Ipsum is simply dummy text of the printing and typesetting
|
||||||
|
industry. Lorem Ipsum has been the industry's standard dummy text
|
||||||
|
ever since the 1500s, when an unknown printer took a galley of type and
|
||||||
|
scrambled it to make a type specimen book. It has survived not only five
|
||||||
|
centuries, but also the leap into electronic typesetting, remaining
|
||||||
|
essentially unchanged. It was popularised in the 1960s with the release
|
||||||
|
of Letraset sheets containing Lorem Ipsum passages, and more recently
|
||||||
|
with desktop publishing software like Aldus PageMaker including versions
|
||||||
|
of Lorem Ipsum.
|
||||||
|
</Paragraph>
|
||||||
|
<Title>Where does it come from?</Title>
|
||||||
|
<Paragraph>
|
||||||
|
Contrary to popular belief, Lorem Ipsum is not simply random text. It
|
||||||
|
has roots in a piece of classical Latin literature from 45 BC, making it
|
||||||
|
over 2000 years old. Richard McClintock, a Latin professor at
|
||||||
|
Hampden-Sydney College in Virginia, looked up one of the more obscure
|
||||||
|
Latin words, consectetur, from a Lorem Ipsum passage, and going through
|
||||||
|
the cites of the word in classical literature, discovered the
|
||||||
|
undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33
|
||||||
|
of "de Finibus Bonorum et Malorum" (The Extremes of Good and
|
||||||
|
Evil) by Cicero, written in 45 BC. This book is a treatise on the theory
|
||||||
|
of ethics, very popular during the Renaissance. The first line of Lorem
|
||||||
|
Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in
|
||||||
|
section 1.10.32.
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
The standard chunk of Lorem Ipsum used since the 1500s is reproduced
|
||||||
|
below for those interested. Sections 1.10.32 and 1.10.33 from "de
|
||||||
|
Finibus Bonorum et Malorum" by Cicero are also reproduced in their
|
||||||
|
exact original form, accompanied by English versions from the 1914
|
||||||
|
translation by H. Rackham.
|
||||||
|
</Paragraph>
|
||||||
|
<Title>Why do we use it?</Title>
|
||||||
|
<Paragraph>
|
||||||
|
It is a long established fact that a reader will be distracted by the
|
||||||
|
readable content of a page when looking at its layout. The point of
|
||||||
|
using Lorem Ipsum is that it has a more-or-less normal distribution of
|
||||||
|
letters, as opposed to using "Content here, content here",
|
||||||
|
making it look like readable English. Many desktop publishing packages
|
||||||
|
and web page editors now use Lorem Ipsum as their default model text,
|
||||||
|
and a search for "lorem ipsum" will uncover many web sites
|
||||||
|
still in their infancy. Various versions have evolved over the years,
|
||||||
|
sometimes by accident, sometimes on purpose (injected humour and the
|
||||||
|
like).
|
||||||
|
</Paragraph>
|
||||||
|
<Title>Where can I get some?</Title>
|
||||||
|
<Paragraph>
|
||||||
|
There are many variations of passages of Lorem Ipsum available, but the
|
||||||
|
majority have suffered alteration in some form, by injected humour, or
|
||||||
|
randomised words which don't look even slightly believable. If you
|
||||||
|
are going to use a passage of Lorem Ipsum, you need to be sure there
|
||||||
|
isn't anything embarrassing hidden in the middle of text. All the
|
||||||
|
Lorem Ipsum generators on the Internet tend to repeat predefined chunks
|
||||||
|
as necessary, making this the first true generator on the Internet. It
|
||||||
|
uses a dictionary of over 200 Latin words, combined with a handful of
|
||||||
|
model sentence structures, to generate Lorem Ipsum which looks
|
||||||
|
reasonable. The generated Lorem Ipsum is therefore always free from
|
||||||
|
repetition, injected humour, or non-characteristic words etc.
|
||||||
|
</Paragraph>
|
||||||
|
</ScrollView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const AlbumsScreen = ({
|
||||||
|
navigation,
|
||||||
|
}: {
|
||||||
|
navigation: NativeStackNavigation;
|
||||||
|
}) => (
|
||||||
|
<React.Fragment>
|
||||||
|
<View style={styles.buttons}>
|
||||||
|
<Button
|
||||||
|
mode="contained"
|
||||||
|
onPress={() => navigation.push('article', { author: 'Babel fish' })}
|
||||||
|
style={styles.button}
|
||||||
|
>
|
||||||
|
Push article
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
mode="outlined"
|
||||||
|
onPress={() => navigation.goBack()}
|
||||||
|
style={styles.button}
|
||||||
|
>
|
||||||
|
Go back
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
<Albums />
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
|
||||||
|
const NativeStack = createNativeStackNavigator<NativeStackParams>();
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
navigation: StackNavigationProp<ParamListBase>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function NativeStackScreen({ navigation }: Props) {
|
||||||
|
navigation.setOptions({
|
||||||
|
headerShown: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
React.useCallback(() => {
|
||||||
|
const drawer = navigation.dangerouslyGetParent() as DrawerNavigationProp<
|
||||||
|
ParamListBase
|
||||||
|
>;
|
||||||
|
|
||||||
|
navigation.setOptions({ gestureEnabled: false });
|
||||||
|
drawer.setOptions({ gestureEnabled: false });
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
navigation.setOptions({ gestureEnabled: true });
|
||||||
|
drawer.setOptions({ gestureEnabled: true });
|
||||||
|
};
|
||||||
|
}, [navigation])
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<NativeStack.Navigator>
|
||||||
|
<NativeStack.Screen
|
||||||
|
name="article"
|
||||||
|
component={ArticleScreen}
|
||||||
|
options={{
|
||||||
|
title: 'Lorem Ipsum',
|
||||||
|
headerLargeTitle: true,
|
||||||
|
headerHideShadow: true,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<NativeStack.Screen
|
||||||
|
name="album"
|
||||||
|
component={AlbumsScreen}
|
||||||
|
options={{ title: 'Album' }}
|
||||||
|
/>
|
||||||
|
</NativeStack.Navigator>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
enableScreens(true);
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
buttons: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
padding: 8,
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
margin: 8,
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
paddingVertical: 16,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: 24,
|
||||||
|
marginVertical: 8,
|
||||||
|
marginHorizontal: 16,
|
||||||
|
},
|
||||||
|
paragraph: {
|
||||||
|
fontSize: 16,
|
||||||
|
lineHeight: 24,
|
||||||
|
marginVertical: 8,
|
||||||
|
marginHorizontal: 16,
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { View, StyleSheet } from 'react-native';
|
import { View, StyleSheet } from 'react-native';
|
||||||
import { Button } from 'react-native-paper';
|
import { Button } from 'react-native-paper';
|
||||||
import { RouteProp, ParamListBase } from '@react-navigation/core';
|
import { RouteProp, ParamListBase } from '@react-navigation/native';
|
||||||
import {
|
import {
|
||||||
createStackNavigator,
|
createStackNavigator,
|
||||||
StackNavigationProp,
|
StackNavigationProp,
|
||||||
@@ -38,7 +38,7 @@ export default function Albums() {
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
backgroundColor: '#343C46',
|
backgroundColor: '#000',
|
||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||