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

Let users use v1 without additional steps #1845

Merged
merged 7 commits into from
Mar 24, 2021

Conversation

Szymon20000
Copy link
Contributor

@Szymon20000 Szymon20000 commented Mar 18, 2021

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

  • Included code example that can be used to test this change
  • Updated TS types
  • Added TS types tests
  • Added unit / integration tests
  • Updated documentation
  • Ensured that CI passes

@Szymon20000 Szymon20000 marked this pull request as ready for review March 18, 2021 09:06
Copy link
Member

@piaskowyk piaskowyk left a 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?"
to
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) {
Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@piaskowyk piaskowyk merged commit 2a6cca6 into master Mar 24, 2021
@piaskowyk piaskowyk deleted the @szymon/fix_problems_with_v1 branch March 24, 2021 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants