From f50ce0850d4c8986b383c6399415bcf98e39d73c Mon Sep 17 00:00:00 2001 From: Eli White Date: Sun, 10 Jun 2018 14:17:13 -0700 Subject: [PATCH] Passing forwardedRef to Slider Reviewed By: sahrens Differential Revision: D8345883 fbshipit-source-id: d2affdba14d38593541e591fe72006c76fca166f --- Libraries/Components/Slider/Slider.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Libraries/Components/Slider/Slider.js b/Libraries/Components/Slider/Slider.js index aacfb14f3..d9efe0170 100644 --- a/Libraries/Components/Slider/Slider.js +++ b/Libraries/Components/Slider/Slider.js @@ -194,10 +194,8 @@ type Props = $ReadOnly<{| * */ const Slider = ( - props: $ReadOnly<{| - ...Props, - forwardedRef?: ?React.Ref<'RCTActivityIndicatorView'>, - |}>, + props: Props, + forwardedRef?: ?React.Ref<'RCTActivityIndicatorView'>, ) => { const style = StyleSheet.compose( styles.slider, @@ -230,6 +228,7 @@ const Slider = ( return ( { - return ; -}); +const SliderWithRef = React.forwardRef(Slider); SliderWithRef.defaultProps = { disabled: false,