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

Migrate ShareableJSRef to jsi::NativeState #6389

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tomekzaw
Copy link
Member

@tomekzaw tomekzaw commented Aug 8, 2024

Summary

According to this tweet posted by @tmikov from Hermes team, usage of jsi::HostObject is strongly discouraged.

This PR migrates ShareableJSRef that used to be a jsi::HostObject to jsi::NativeState as well as renames it to ShareableNativeState for consistency. Finally, this PR also updates all usages accordingly.

Caution

jsi::NativeState was added in React Native 0.71 but requires 0.72 to work correctly on Android or iOS. Also, it still does not work on some configurations, e.g. macOS with JSC (Hermes disabled) – available from [email protected]. Let's hold this PR until jsi::NativeState is supported on all supported configurations.

Note

TODO: compare performance

Test plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant