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

Enable IntersectionObserver in Catalyst and RNTester

Open rubennorte opened this issue 2 years ago • 6 comments

Summary: This creates 2 examples for IntersectionObserver in RNTester:

  • The first example is just a copy of the example provided by MDN in the documentation page for IntersectionObserver (https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). This example is useful to show how React Native behaves the same way with the same code.
  • The second example is a "stress test" for the API: a screen with 500 simultaneous node being observed at the same time with different observers. As we compute the intersections after scroll (after "mounting" the state update with the updated scroll position) in the main thread, this highlights a possible impact on scroll performance.

IntersectionObserver isn't yet enabled by default, so no need to add a changelog entry about this. We'll add one when the API becomes generally available.

Changelog: [Internal]

Differential Revision: D45736845

rubennorte avatar Jun 13 '23 20:06 rubennorte

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

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

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

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

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,977,546 +3,474
android hermes armeabi-v7a 8,238,568 +3,304
android hermes x86 9,491,445 +3,704
android hermes x86_64 9,333,799 +3,597
android jsc arm64-v8a 9,537,210 +2,345
android jsc armeabi-v7a 8,675,560 +2,170
android jsc x86 9,621,983 +2,584
android jsc x86_64 9,868,452 +2,472

Base commit: 7e934947d752d1f49a8d848209a7aaf02cdb700b Branch: main

analysis-bot avatar Jun 14 '23 10:06 analysis-bot

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

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

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

facebook-github-bot avatar Jun 14 '23 12:06 facebook-github-bot

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

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

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

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

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

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

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

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

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

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

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

facebook-github-bot avatar Jun 23 '23 08:06 facebook-github-bot

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

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