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/54000 Update the scroll view manager to load the fabric state and restore the scroll position and scroll away top padding on mount. Restoring the scroll view happens in the react scroll view state setter, which gets called by the `ReactScrollViewHelper` with the deserialized state provided on mount. The state loading will happen only until the scroll view itself submits a new state to Fabric (due to scrolling). This guarantees that we only restore the initial state on mount. This diff also updates the scroll away top padding setter to support setting a new value without triggering a fabric state update. Changelog: [Internal] Reviewed By: rshest Differential Revision: D83247016 fbshipit-source-id: 7ae44b9f69c58da9e5163574073767aea2713b62