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

React Native 78/ React 19 support - currently not work #2974

Closed
1 task done
petrikjan opened this issue Feb 20, 2025 · 11 comments
Closed
1 task done

React Native 78/ React 19 support - currently not work #2974

petrikjan opened this issue Feb 20, 2025 · 11 comments
Labels
bug Something isn't working

Comments

@petrikjan
Copy link

Description

react-native-Skia doesn't work on RN78 (new architecture). The error I’m getting is: "Cannot read property 'ReactCurrentOwner' of undefined." Do you plan to add support? Or could the issue be on my end with the setup?

React Native Skia Version

1.11.8

React Native Version

0.78.0

Using New Architecture

  • Enabled

Steps to Reproduce

Just create canvas

Snack, Code Example, Screenshot, or Link to Repository

import React from "react";
import { Canvas, Circle, Group } from "@shopify/react-native-skia";

const App = () => {
const width = 256;
const height = 256;
const r = width * 0.33;
return (
<Canvas style={{ width, height }}>

);
};

export default App;

@petrikjan petrikjan added the bug Something isn't working label Feb 20, 2025
@petrikjan petrikjan changed the title React Native 78/ React 19 React Native 78/ React 19 support - currently not work Feb 20, 2025
@erie-e9
Copy link

erie-e9 commented Feb 26, 2025

+1

1 similar comment
@jerearaujo03
Copy link

+1

@oleksandrditkovskyi
Copy link

Hi Shopify team, any updates on this issue? It’s been open for a while. Just checking if it might have been overlooked.
Tagging @wcandillon @chrfalch for visibility. Thanks! 🙌

@lougoncharenko
Copy link

+1 hoping to get a time frame on this

@petrikjan
Copy link
Author

petrikjan commented Feb 28, 2025

Hi, I tried this PR, Skia compiles successfully, and the first render loads fine. However, immediately after, I get the error: "Error: Value is true, expected an Object, js engine: Hermes." In ReanimatedRecorder:193 drawPath. It seems to happen with all components, not just Rect.

Rendering an empty works fine now, it no longer crashes.

This crashes:
<Canvas style={{ position: 'absolute', top: 0, left: 0, width: size.width, height: size.height }}>

React Native 0.78.0, React 19, Reanimated 4.0.0-beta.2

EDIT:
Also happens on Reanimated 3.17.0

@wcandillon

@pwltr
Copy link

pwltr commented Feb 28, 2025

Just posting my error message so other people can find their way here, fwiw I'm on old architecture.

TypeError: Cannot read property 'ReactCurrentOwner' of undefined, js engine: hermes

react-native 0.78.0, react: 19.0.0, react-native-skia: 1.11.8, react-native-reanimated": 3.16.7, old arch

@jonsully1
Copy link

Getting the same error, came across it whilst attempting to use victory-native again after react-native-reanimated updated their project to work with 0.78.

react-native: 0.78.0
react: 19.0.0
react-native-reanimated: 3.17.1
@shopify/react-native-skia: 1.11.8

Looking forward to an update from you guys too :-)

@wcandillon
Copy link
Contributor

React 19 and React Native 0.78 support is available via @shopify/react-native-skia@next. It will take a bit of time for it to land in v2. Let me know how did goes.

@petrikjan
Copy link
Author

Hi, I confirm it works! Thank you for the great work!

@erie-e9
Copy link

erie-e9 commented Mar 5, 2025

Hey guys, It's working fine for me with @shopify/react-native-skia@next but I just tested it with @shopify/react-native-skia@1.11.11 and I'm experiencing same error. @wcandillon

Error

@petrikjan
Copy link
Author

Hey guys, It's working fine for me with @shopify/react-native-skia@next but I just tested it with @shopify/react-native-skia@1.11.11 and I'm experiencing same error. @wcandillon

Error

In this version 1.11.11, React 19/RN 78 is not supported, which is why they released @next, as I understand it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants