Skip to content

Commit 0180470

Browse files
authored
chore(example): upgrade to Expo SDK 57 and React Native 0.86 (#141)
* chore(example): upgrade to Expo SDK 57 and React Native 0.86 * fix(example): align iOS pods with hoisted dependencies * fix(example): run Skia binary installer with Bun
1 parent 4d1a7db commit 0180470

31 files changed

Lines changed: 1000 additions & 860 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ yarn add <a href="https://github.com/Shopify/react-native-skia">@shopify/react-n
3939
yarn add <b>react-native-graph</b>
4040
</pre>
4141

42+
### Expo
43+
44+
The [Expo example](./example/) runs in Expo Go with Expo SDK 57. Install `react-native-graph` alongside the Expo SDK's compatible versions of Skia, Reanimated, Worklets, and Gesture Handler. Start the example from its `example` directory and open it in Expo Go to try the graph without building a custom development client.
45+
4246
## Usage
4347

4448
```tsx

‎bun.lock‎

Lines changed: 291 additions & 236 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎example/android/app/src/main/java/graph/example/MainActivity.kt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnable
99
import com.facebook.react.defaults.DefaultReactActivityDelegate
1010

1111
import expo.modules.ReactActivityDelegateWrapper
12+
import expo.modules.splashscreen.SplashScreenManager
1213

1314
class MainActivity : ReactActivity() {
1415
override fun onCreate(savedInstanceState: Bundle?) {
15-
// Set the theme to AppTheme BEFORE onCreate to support
16-
// coloring the background, status bar, and navigation bar.
17-
// This is required for expo-splash-screen.
18-
setTheme(R.style.AppTheme);
16+
// @generated begin expo-splashscreen - expo prebuild (DO NOT MODIFY) sync-f3ff59a738c56c9a6119210cb55f0b613eb8b6af
17+
SplashScreenManager.registerOnActivity(this)
18+
// @generated end expo-splashscreen
1919
super.onCreate(null)
2020
}
2121

-8.51 KB
Loading
-5.89 KB
Loading
-11.9 KB
Loading
-18.5 KB
Loading
-26.2 KB
Loading

‎example/android/app/src/main/res/values/styles.xml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<item name="android:statusBarColor">@android:color/transparent</item>
66
<item name="android:navigationBarColor">@android:color/transparent</item>
77
</style>
8-
<style name="Theme.App.SplashScreen" parent="AppTheme">
9-
<item name="android:windowBackground">@drawable/ic_launcher_background</item>
8+
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
9+
<item name="windowSplashScreenBackground">@color/splashscreen_background</item>
10+
<item name="windowSplashScreenAnimatedIcon">@drawable/splashscreen_logo</item>
11+
<item name="postSplashScreenTheme">@style/AppTheme</item>
12+
<item name="android:windowSplashScreenBehavior">icon_preferred</item>
1013
</style>
1114
</resources>
718 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)