react-native
react-native copied to clipboard
Enable IntersectionObserver in Catalyst and RNTester
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
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
| 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
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request was exported from Phabricator. Differential Revision: D45736845
This pull request has been merged in facebook/react-native@a94bbfbe0e7a1c72350d92f4610ad6181a569abb.