Does anyone have an example project or a link to react-native-skia actually working with Expo? Do you have it working with the web?
1 Answers
Great timing! I was struggling with the same thing a few weeks ago, and I finally figured it out.
Have a look: https://github.com/gjtiquia/react-native-web-skia
Update: June 22, 2023
Some things to keep in mind:
Expo does not support Reanimated 3 yet, meaning you can only use Reanimated 2, so that probably means you cannot use the UI thread and all animations will be driven by the JS main thread.
Remember to follow the web setup for BOTH React Native Skia and Reanimated.
If you are using the WithSkiaWeb component, make sure that this component will only appear in the web app. If the component ever appeared in the native app and you tried to open the the app with Expo Go, it will crash. Using the Platform module does not help either. The only way I got it to work was by separating the web and native code using Platform-specific extensions. The native app can load the Skia canvas component directly while the web app must load it via the
WithSkiaWeb
component.

- 96
- 3
-
1As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 21 '23 at 14:36
-
Thanks for the feedback! I'll definitely add more helpful details on my answer. – gjtiquia Jun 22 '23 at 00:31