mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53033 This diff replaces the logic introduced in D72078450 to prevent `onPointerEnter`/`onPointerLeave` from firing when a button is pressed. The new approach trades off some complexity for reliability: instead of deferring `ACTION_HOVER_EXIT` handling to the next frame, we now suppress it immediately if any button is pressed (`buttonState != 0`). This simpler logic appears to work reliably on Quest devices, though it may behave differently on the Android emulator (something we’ll monitor). The main reason for this change is that deferring ACTION_HOVER_EXIT introduces problems in newer Spatial React use cases, particularly when a single component hierarchy spans multiple roots. For example, when hovering between ReactSurfaceRoot and another root like VolumetricWindow, deferring ACTION_HOVER_EXIT can lead to incorrect enter/exit ordering: * Cursor starts hovering over `ReactSurfaceRoot` * Cursor moves to `VolumetricWindow` * `ACTION_HOVER_EXIT` (`ReactSurfaceRoot`) — deferred * `ACTION_HOVER_ENTER` (`VolumetricWindow`) — processed * `ACTION_HOVER_EXIT` (`ReactSurfaceRoot`) — processed (too late) This results in inconsistent hover state updates across roots, which this diff resolves by handling `ACTION_HOVER_EXIT` immediately when appropriate. Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D79504775 fbshipit-source-id: ea97bff48ddf4d3d09caf56ca29057c202b12409
Where is the template?
The React Native Template has moved from being shipping inside the react-native package to it's own package: @react-native-community/template.
Why has it moved?
The React Native Frameworks RFC0759 provides background information.
When was it moved?
The 0.75 release.