Skip to content

Commit d8740f5

Browse files
committed
feat: introduce latest skia version
Key Highlights: - Updated skia version to newest release, 1.0.2 - Shifted responsibility of initializing Skia on web to client - Fixed example application Expo Router implementation to load skia before rendering the app
1 parent 761cb73 commit d8740f5

File tree

10 files changed

+24
-66
lines changed

10 files changed

+24
-66
lines changed

example/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import "@expo/metro-runtime";
2+
import { App } from "expo-router/build/qualified-entry";
3+
import { renderRootComponent } from "expo-router/build/renderRootComponent";
4+
5+
renderRootComponent(App);

example/index.web.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import "@expo/metro-runtime";
2+
import { LoadSkiaWeb } from "@shopify/react-native-skia/lib/module/web";
3+
import { App } from "expo-router/build/qualified-entry";
4+
import { renderRootComponent } from "expo-router/build/renderRootComponent";
5+
6+
LoadSkiaWeb().then(() => renderRootComponent(App));

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ PODS:
10141014
- React-debug
10151015
- react-native-safe-area-context (4.8.2):
10161016
- React-Core
1017-
- react-native-skia (0.1.241):
1017+
- react-native-skia (1.0.2):
10181018
- glog
10191019
- RCT-Folly (= 2022.05.16.00)
10201020
- React
@@ -1502,7 +1502,7 @@ SPEC CHECKSUMS:
15021502
React-logger: 0a57b68dd2aec7ff738195f081f0520724b35dab
15031503
React-Mapbuffer: 63913773ed7f96b814a2521e13e6d010282096ad
15041504
react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89
1505-
react-native-skia: 8fa65cf8828f6f8f9629e1577c0b079b7160d422
1505+
react-native-skia: 0c09a4baff5db09a88dc6c9bfba25bcf4f5bbe8a
15061506
React-nativeconfig: d7af5bae6da70fa15ce44f045621cf99ed24087c
15071507
React-NativeModulesApple: 0123905d5699853ac68519607555a9a4f5c7b3ac
15081508
React-perflogger: 8a1e1af5733004bdd91258dcefbde21e0d1faccd

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "example",
33
"version": "1.0.0",
4-
"main": "expo-router/entry",
4+
"main": "index",
55
"scripts": {
66
"start": "expo start --dev-client",
77
"android": "expo run:android",
@@ -11,7 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@expo/metro-runtime": "~3.1.3",
14-
"@shopify/react-native-skia": "^0.1.241",
14+
"@shopify/react-native-skia": "1.0.2",
1515
"expo": "~50.0.8",
1616
"expo-blur": "~12.9.2",
1717
"expo-constants": "~15.4.5",

example/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,10 +2305,10 @@
23052305
component-type "^1.2.1"
23062306
join-component "^1.1.0"
23072307

2308-
"@shopify/react-native-skia@^0.1.241":
2309-
version "0.1.241"
2310-
resolved "https://registry.yarnpkg.com/@shopify/react-native-skia/-/react-native-skia-0.1.241.tgz#592471a565f3a7792e03a453eaf922518dd994e5"
2311-
integrity sha512-jQFJHiNUVONTGPPnL7LIJc3kg6x4PBPh3m7NAJuTxuhB8VOSVlQR3UWd4tDHHJgj7otG3S2dbHD7+bftxM5cFA==
2308+
"@shopify/react-native-skia@1.0.2":
2309+
version "1.0.2"
2310+
resolved "https://registry.yarnpkg.com/@shopify/react-native-skia/-/react-native-skia-1.0.2.tgz#3ffa54f5df524ebae0ce55bee1e9efbe3e7cf959"
2311+
integrity sha512-w6qS+jCeUGKDJAOok5QJV6flWlvFt0Vmc9mNXi2n4jfHkQ+uccYVHFCXazhCAc5b8mFjcfMNygy12SVgP4d46g==
23122312
dependencies:
23132313
canvaskit-wasm "0.39.1"
23142314
react-reconciler "0.27.0"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"@types/react": "17.0.21"
8686
},
8787
"peerDependencies": {
88-
"@shopify/react-native-skia": "0.1.241",
88+
"@shopify/react-native-skia": "1.0.2",
8989
"react": ">=18.0.0",
9090
"react-native": ">=0.71.0",
9191
"react-native-gesture-handler": ">=2.0.0",

src/components/SkiaComponents.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/components/SkiaComponents.web.tsx

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/components/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { LineChart } from "./LineChart";
2+
export type { LineChartProps } from "./LineChart";
3+
export { AxisLabelComponentProps } from "./LineChart/AxisLabel";

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export { LineChart, type LineChartProps } from "./components/SkiaComponents";
2-
export { type AxisLabelComponentProps } from "./components/LineChart/AxisLabel";
1+
export { LineChart, type LineChartProps, type AxisLabelComponentProps } from "./components";

0 commit comments

Comments
 (0)