Skip to content

Conversation

PeteTheHeat
Copy link
Contributor

Summary:
Problem Statement: A native module needs to call a function on ReactInstance (in this case loadScript). Typically, this is handled by the bridge.
Current Bridgeless Solution: Create a new protocol (in this case RCTJSScriptLoaderModule) which lets a block be passed in TM init to forward the method call to ReactInstance. This is the best thing I could think of right now.

Reviewed By: RSNara

Differential Revision: D22512748

Summary:
Problem Statement: A native module needs to call a function on `ReactInstance` (in this case `loadScript`). Typically, this is handled by the bridge.
Current Bridgeless Solution: Create a new protocol (in this case `RCTJSScriptLoaderModule`) which lets a block be passed in TM init to forward the method call to `ReactInstance`. This is the best thing I could think of right now.

Reviewed By: RSNara

Differential Revision: D22512748

fbshipit-source-id: c8d9f08e73c86e7a8a95be791b6cbed4f7a67cb2
@PeteTheHeat PeteTheHeat requested a review from shergin as a code owner July 21, 2020 16:17
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner RN Team fb-exported labels Jul 21, 2020
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D22512748

@pull-bot
Copy link

Messages
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.
📖 📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.

Generated by 🚫 dangerJS against 03e1662

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 6,764,621 0
android hermes armeabi-v7a 6,432,282 0
android hermes x86 7,152,465 0
android hermes x86_64 7,042,373 0
android jsc arm64-v8a 8,935,969 0
android jsc armeabi-v7a 8,596,010 0
android jsc x86 8,766,922 0
android jsc x86_64 9,342,439 0

Base commit: da865b2

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: da865b2

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @PeteTheHeat in 448db78.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jul 24, 2020
@PeteTheHeat PeteTheHeat deleted the export-D22512748 branch July 27, 2020 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner RN Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants