expo-template-bare-minimum 43.0.13 → 44.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  package com.helloworld;
2
2
 
3
+ import android.os.Build;
3
4
  import android.os.Bundle;
4
5
 
5
6
  import com.facebook.react.ReactActivity;
6
7
  import com.facebook.react.ReactActivityDelegate;
7
8
  import com.facebook.react.ReactRootView;
8
- import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
9
9
 
10
10
  import expo.modules.ReactActivityDelegateWrapper;
11
11
 
@@ -30,13 +30,28 @@ public class MainActivity extends ReactActivity {
30
30
 
31
31
  @Override
32
32
  protected ReactActivityDelegate createReactActivityDelegate() {
33
- return new ReactActivityDelegateWrapper(
34
- this,
35
- new ReactActivityDelegate(this, getMainComponentName()) {
36
- @Override
37
- protected ReactRootView createRootView() {
38
- return new RNGestureHandlerEnabledRootView(MainActivity.this);
33
+ return new ReactActivityDelegateWrapper(this,
34
+ new ReactActivityDelegate(this, getMainComponentName())
35
+ );
36
+ }
37
+
38
+ /**
39
+ * Align the back button behavior with Android S
40
+ * where moving root activities to background instead of finishing activities.
41
+ * @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a>
42
+ */
43
+ @Override
44
+ public void invokeDefaultOnBackPressed() {
45
+ if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
46
+ if (!moveTaskToBack(false)) {
47
+ // For non-root activities, use the default implementation to finish them.
48
+ super.invokeDefaultOnBackPressed();
39
49
  }
40
- });
50
+ return;
51
+ }
52
+
53
+ // Use the default back button implementation on Android S
54
+ // because it's doing more than {@link Activity#moveTaskToBack} in fact.
55
+ super.invokeDefaultOnBackPressed();
41
56
  }
42
57
  }
@@ -16,7 +16,6 @@ import expo.modules.ApplicationLifecycleDispatcher;
16
16
  import expo.modules.ReactNativeHostWrapper;
17
17
 
18
18
  import com.facebook.react.bridge.JSIModulePackage;
19
- import com.swmansion.reanimated.ReanimatedJSIModulePackage;
20
19
 
21
20
  import java.lang.reflect.InvocationTargetException;
22
21
  import java.util.List;
@@ -43,11 +42,6 @@ public class MainApplication extends Application implements ReactApplication {
43
42
  protected String getJSMainModuleName() {
44
43
  return "index";
45
44
  }
46
-
47
- @Override
48
- protected JSIModulePackage getJSIModulePackage() {
49
- return new ReanimatedJSIModulePackage();
50
- }
51
45
  });
52
46
 
53
47
  @Override
@@ -1,7 +1,4 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!--
3
- This file was created by '@expo/configure-splash-screen' and some of it's content shouldn't be modified by hand
4
- -->
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
5
2
  <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
6
3
  <item android:drawable="@color/splashscreen_background"/>
7
- </layer-list>
4
+ </layer-list>
@@ -1,5 +1,4 @@
1
- <?xml version="1.0" encoding="utf-8"?>
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
2
  <resources>
3
- <!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
4
3
  <color name="splashscreen_background">#FFFFFF</color>
5
- </resources>
4
+ </resources>
@@ -8,9 +8,7 @@
8
8
  <item name="android:textColorHint">#c8c8c8</item>
9
9
  <item name="android:textColor">@android:color/black</item>
10
10
  </style>
11
- <style name="Theme.App.SplashScreen" parent="Theme.AppCompat.Light.NoActionBar">
12
- <!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
11
+ <style name="Theme.App.SplashScreen" parent="AppTheme">
13
12
  <item name="android:windowBackground">@drawable/splashscreen</item>
14
- <!-- Customize your splash screen theme here -->
15
13
  </style>
16
14
  </resources>
package/babel.config.js CHANGED
@@ -1,7 +1,6 @@
1
1
  module.exports = function(api) {
2
2
  api.cache(true);
3
3
  return {
4
- presets: ['babel-preset-expo'],
5
- plugins: ['react-native-reanimated/plugin']
4
+ presets: ['babel-preset-expo']
6
5
  };
7
6
  };
package/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import 'react-native-gesture-handler';
2
1
  import { registerRootComponent } from 'expo';
3
2
 
4
3
  import App from './App';
@@ -33,17 +33,11 @@ static void InitializeFlipper(UIApplication *application) {
33
33
  InitializeFlipper(application);
34
34
  #endif
35
35
 
36
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
37
- RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil];
38
- id rootViewBackgroundColor = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RCTRootViewBackgroundColor"];
39
- if (rootViewBackgroundColor != nil) {
40
- rootView.backgroundColor = [RCTConvert UIColor:rootViewBackgroundColor];
41
- } else {
42
- rootView.backgroundColor = [UIColor whiteColor];
43
- }
44
-
36
+ RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
37
+ RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
38
+ rootView.backgroundColor = [UIColor whiteColor];
45
39
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
46
- UIViewController *rootViewController = [UIViewController new];
40
+ UIViewController *rootViewController = [self.reactDelegate createRootViewController];
47
41
  rootViewController.view = rootView;
48
42
  self.window.rootViewController = rootViewController;
49
43
  [self.window makeKeyAndVisible];
package/package.json CHANGED
@@ -1,26 +1,21 @@
1
1
  {
2
2
  "name": "expo-template-bare-minimum",
3
3
  "description": "This bare project template includes a minimal setup for using unimodules with React Native.",
4
- "version": "43.0.13",
4
+ "version": "44.0.3",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
+ "start": "expo start --dev-client",
7
8
  "android": "expo run:android",
8
9
  "ios": "expo run:ios",
9
- "web": "expo start --web",
10
- "start": "react-native start"
10
+ "web": "expo start --web"
11
11
  },
12
12
  "dependencies": {
13
- "expo": "~43.0.2",
14
- "expo-splash-screen": "~0.13.5",
15
- "expo-status-bar": "~1.1.0",
16
- "expo-updates": "~0.10.13",
13
+ "expo": "~44.0.0-beta.1",
14
+ "expo-splash-screen": "~0.14.0",
15
+ "expo-status-bar": "~1.2.0",
17
16
  "react": "17.0.1",
18
17
  "react-dom": "17.0.1",
19
18
  "react-native": "0.64.3",
20
- "react-native-gesture-handler": "~1.10.2",
21
- "react-native-reanimated": "~2.2.0",
22
- "react-native-safe-area-context": "3.3.2",
23
- "react-native-screens": "~3.8.0",
24
19
  "react-native-web": "0.17.1"
25
20
  },
26
21
  "devDependencies": {
package/__tests__/App.js DELETED
@@ -1,10 +0,0 @@
1
- import 'react-native';
2
- import React from 'react';
3
- import App from '../App';
4
-
5
- // Note: test renderer must be required after react-native.
6
- import renderer from 'react-test-renderer';
7
-
8
- it('renders correctly', () => {
9
- renderer.create(<App />);
10
- });