-
-
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
Let users use v1 without additional steps #1845
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested and is ok.
Maybe we should change little the warn message
"Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?" |
Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin? If you want to use only Reanimated v1, you can ignore this message.
}; | ||
_setGlobalConsole(console); | ||
})(); | ||
if (!NativeReanimated.useOnlyV1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR, but is it possible to expose this in a public API? My use case is to do feature detection regarding if I can use the Reanimated 2 APIs and then use the new implementation if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Szymon20000 What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
Fixes: #1838
Fixes: #1825
Fixes: #1798
We forgot To wrap some initialization steps of rea 2 into a condition that checks if the native side of reanimated 2 is available. Because of that people that want to use only v1 have to go through installation steps on Android.
Checklist