Description
Both standard threshold and React Native rnRootThreshold arrays use JavaScript default .sort(), which compares their string forms. Valid small values written in exponential notation can therefore remain out of numeric order; for example [0.000001, 1e-7] is returned unchanged.
Expected behavior
Both exposed threshold arrays should be sorted in numerically ascending order as required by IntersectionObserver normalization.
React Native Version
0.87.1 and current main
Affected Platforms
New Architecture - All
Description
Both standard
thresholdand React NativernRootThresholdarrays use JavaScript default.sort(), which compares their string forms. Valid small values written in exponential notation can therefore remain out of numeric order; for example[0.000001, 1e-7]is returned unchanged.Expected behavior
Both exposed threshold arrays should be sorted in numerically ascending order as required by IntersectionObserver normalization.
React Native Version
0.87.1 and current main
Affected Platforms
New Architecture - All