Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(🌍): Fix RN Web support #2954

Merged
merged 3 commits into from
Feb 8, 2025
Merged

fix(🌍): Fix RN Web support #2954

merged 3 commits into from
Feb 8, 2025

Conversation

wcandillon
Copy link
Contributor

@wcandillon wcandillon commented Feb 8, 2025

fixes #2914 #2943

This is based on the great example provided by @nathan-ahn (which we will have to merge separately unfortunately).

@wcandillon wcandillon mentioned this pull request Feb 8, 2025
@wcandillon wcandillon merged commit 121ebd4 into main Feb 8, 2025
7 checks passed
Copy link
Contributor

github-actions bot commented Feb 8, 2025

🎉 This PR is included in version 1.11.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@daniel112
Copy link

I am now getting React is not defined
image

expo: 52.0.32
react-native-web: 0.19.13
react-native-skia: 1.11.6

@wcandillon
Copy link
Contributor Author

@daniel112 let us know if you can share a reproduction with us

@daniel112
Copy link

daniel112 commented Feb 11, 2025

@daniel112 let us know if you can share a reproduction with us

Sure thing @wcandillon
https://github.com/daniel112/skia-on-web-example

let me know if I'm missing something here

@daniel112
Copy link

it seems like it's the same error as #2941

if I modify the node_modules/@shopify/react-native-skia/lib/module/renderer/Canvas.js
with import React

import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from "react";

the app loads fine

@wcandillon
Copy link
Contributor Author

wcandillon commented Feb 11, 2025 via email

@wcandillon
Copy link
Contributor Author

wcandillon commented Feb 11, 2025 via email

@daniel112
Copy link

I understand the issue more holistically now, will publish a fix for it
tomorrow, thank you for the repro

Thanks for the prompt response!

@daniel112
Copy link

is the core issue just a discrepancy between how skia gets compiled into web?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReferenceError: SkiaViewApi is not defined in React Native Web w/ react-native-skia 1.8.0
2 participants