react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode

Open dmytrorykun opened this issue 1 year ago • 1 comments

Summary: In bridge mode UIManager's constants contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are genericBubblingEventTypes and genericDirectEventTypes. They are then merged into bubblingEventTypes and directEventTypes of every view config.

This diff replaces getNativeViewConfig binding with getConstants to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that constants will be cached on JS side just as it is done in bridge mode.

Differential Revision: D46698717

dmytrorykun avatar Jun 13 '23 21:06 dmytrorykun

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

facebook-github-bot avatar Jun 13 '23 21:06 facebook-github-bot

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

facebook-github-bot avatar Jun 16 '23 22:06 facebook-github-bot

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 9,045,226 -1
android hermes armeabi-v7a 8,294,501 +2
android hermes x86 9,561,417 -3
android hermes x86_64 9,403,753 +0
android jsc arm64-v8a 9,604,419 +0
android jsc armeabi-v7a 8,731,135 +1
android jsc x86 9,691,466 +1
android jsc x86_64 9,937,807 -1

Base commit: c803a5bfa12a4305daa846c94e8112a7661a8dfc Branch: main

analysis-bot avatar Jun 16 '23 22:06 analysis-bot

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

facebook-github-bot avatar Jun 20 '23 13:06 facebook-github-bot

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

facebook-github-bot avatar Jun 27 '23 15:06 facebook-github-bot

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

facebook-github-bot avatar Jun 27 '23 15:06 facebook-github-bot

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

facebook-github-bot avatar Jun 28 '23 09:06 facebook-github-bot

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

facebook-github-bot avatar Jun 28 '23 10:06 facebook-github-bot

This pull request was successfully merged by @dmytrorykun in a9618b33be1e534dd856791d803b55d10b510bb8.

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

github-actions[bot] avatar Jun 28 '23 11:06 github-actions[bot]

This pull request has been merged in facebook/react-native@a9618b33be1e534dd856791d803b55d10b510bb8.

facebook-github-bot avatar Jun 28 '23 11:06 facebook-github-bot