Skip to content

🎥 Make videos programmatically with React

make skia types work

Jonny Burger4dce311f3364
diff --git a/packages/example/src/index.ts b/packages/example/src/index.ts
index 9991fa2dab..f6fe3b12f2 100644
--- a/packages/example/src/index.ts
+++ b/packages/example/src/index.ts
@@ -1,11 +1,10 @@
-// eslint-disable-next-line @typescript-eslint/ban-ts-comment
-// @ts-ignore should not care about react not being used
-import {LoadSkia} from '@shopify/react-native-skia/src/web';
import {registerRoot} from 'remotion';
+// @ts-expect-error load-skia
+import {loadSkia} from './load-skia.js';
// Should be able to defer registerRoot()
(async () => {
- await LoadSkia();
+ await loadSkia();
const {Index} = await import('./Root');
registerRoot(Index);
})();
diff --git a/packages/example/src/load-skia.js b/packages/example/src/load-skia.js
new file mode 100644
index 0000000000..25326604b9
--- /dev/null
+++ b/packages/example/src/load-skia.js
@@ -0,0 +1,4 @@
+export const loadSkia = async () => {
+ const {LoadSkia} = await import('@shopify/react-native-skia/src/web');
+ return LoadSkia();
+};