-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ReanimatedError: Property 'window' doesn't exist, js engine: reanimated #6472
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
Are you sure variables named |
(I similarly upgraded from 3.6 to 3.15) |
Hey @wcandillon, thanks for opening the issue. Heads-up: link in issue description is broken, here's a correct link: https://github.com/Shopify/react-native-skia/blob/963d1c35dc57e5c36e178fa66b878c75f1a17d6f/apps/paper/src/Examples/Vertices/Vertices.tsx#L25 (with You're right, it looks like So previously However, in worklet runtime, cc @tjzel who's the author of the PR |
@tomekzaw Explained it well. The closure capturing in worklets isn't smart. It doesn't use all semantic analysis available to it. In result it's not really feasible to discern if While this could be improved (and I hope in the future I will find some time for it) I strongly advise not to name variables |
Description
After upgrading from 3.6 to 3.15, variables named window seem to be treated differently. In examples where I had a variable named window. I got the following error:
ReanimatedError: Property 'window' doesn't exist, js engine: reanimated
. I assumed this is because of thewindow
variable on Web. Renaming this variable to something else (e.gwin
), fixes the issue immediately.Steps to reproduce
Create an example that uses window as a variable name, e.g: https://github.com/Shopify/react-native-skia/blob/main/example/src/Examples/Vertices/Vertices.tsx#L25
Snack or a link to a repository
https://github.com/Shopify/react-native-skia/blob/main/example/src/Examples/Vertices/Vertices.tsx#L25
Reanimated version
3.15
React Native version
0.75
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: