Commit Graph

2 Commits

Author SHA1 Message Date
Moti Zilberman d6e0bc714a Enable lint/sort-imports everywhere (#41334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41334

TSIA.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51025812

fbshipit-source-id: e10d437be775a6b80946483aa96460f34927f870
2023-11-06 12:59:38 -08:00
Rubén Norte a94bbfbe0e Enable IntersectionObserver in Catalyst and RNTester (#37863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37863

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]

Reviewed By: rshest

Differential Revision: D45736845

fbshipit-source-id: 40b6bce39f90e04653504b1033a4edfaa65e93ca
2023-06-23 02:56:04 -07:00