Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Right now, people are calling `getInnerViewNode` and `getInnerViewRef` to get the ref of the `View` within `ScrollView`. Instead, this change adds a prop to `ScrollView` to give people direct access to that `View` if they need it. Previous usage: ``` const myRef = React.createRef<React.ElementRef<typeof ScrollView>>(); <ScrollView ref={myRef} /> const innerViewRef = myRef.current.getInnerViewRef(); innerViewRef.measure(); ``` New usage: ``` const myRef = React.createRef<React.ElementRef<typeof View>>(); <ScrollView innerViewRef={myRef} /> // now, myRef.current can be used directly as the ref myRef.current.measure(); ``` Changelog: [Changed][General] ScrollView: Deprecate getInnerViewNode and getInnerViewRef methods. Use innerViewRef={myRef} prop instead. Reviewed By: TheSavior Differential Revision: D19713191 fbshipit-source-id: 3304cb94a253dafb458ef49d6331e0e432693431
- Loading branch information