You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Launching expo-pixi's Signature module in web mode crashes, but in native mode it works perfectly fine.
The issue is a difference of behaviour in the API of GLView regarding the ref prop.
N.B.: there's a second bug related to getContextAttributes() that can be solved in expo-pixi, I already documented that there, to fix it simply change in the Signature module that line:
That snack does not show the issue as is, as a fix needs to be applied to expo-pixi first (cf above).
Though in my own code, both errors are thrown together.
Steps to Reproduce
Take the code in the snack locally, and use a hacked version of expo-pixi to get through the first issue.
Then try the fix below.
When you run the above on the ios/android platforms it works fine, but on the web platform it crashes, yelling:
Warning: GLView: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)
in GLView (at Signature.js:186)
in Signature (at ...)
...
The fix I found has been to remove the ref attribute, and simply refer to the GLView instance as a ref:
I believe the solution above is not right, because the ref= prop should behave the same on both web and native platforms. I believe the GLView component should expose a similar interface, and at worst not crash (or show a typescript error if the interface is different).
This is why I'm making an issue here about this and not on expo-pixi.
The text was updated successfully, but these errors were encountered:
Hello 👋 I'm still using my own branch of expo-pixi to circumvent the exposed issue. It's about to be a year, and nobody cared about this ☹ Has anybody any advice/opinion about that, and what would be the best way to solve this?
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.
🐛 Bug Report
Summary of Issue
Launching
expo-pixi
's Signature module in web mode crashes, but in native mode it works perfectly fine.The issue is a difference of behaviour in the API of GLView regarding the
ref
prop.Environment - output of
expo diagnostics
& the platform(s) you're targetingTargeting the web platform.
Reproducible Demo
https://snack.expo.io/93GKJUA1c
That snack does not show the issue as is, as a fix needs to be applied to expo-pixi first (cf above).
Though in my own code, both errors are thrown together.
Steps to Reproduce
Take the code in the snack locally, and use a hacked version of expo-pixi to get through the first issue.
Then try the fix below.
Expected Behavior vs Actual Behavior
The issue is within the
expo-pixi
source code, in Signature.js:When you run the above on the ios/android platforms it works fine, but on the web platform it crashes, yelling:
The fix I found has been to remove the ref attribute, and simply refer to the
GLView
instance as a ref:I believe the solution above is not right, because the
ref=
prop should behave the same on both web and native platforms. I believe theGLView
component should expose a similar interface, and at worst not crash (or show a typescript error if the interface is different).This is why I'm making an issue here about this and not on expo-pixi.
The text was updated successfully, but these errors were encountered: