react-native-reanimated-bottom-sheet icon indicating copy to clipboard operation
react-native-reanimated-bottom-sheet copied to clipboard

Typescript ref type error

Open ercangunbilek opened this issue 4 years ago • 5 comments

Ekran Resmi 2020-11-17 21 57 30 Ekran Resmi 2020-11-17 21 59 33

ercangunbilek avatar Nov 17 '20 19:11 ercangunbilek

Did you try to initialize the reference to null?

AugustoMarcelo avatar Nov 18 '20 22:11 AugustoMarcelo

Using const sheetRef = useRef<BottomSheet>(null); instead of const sheetRef = useRef<BottomSheet>(); solved my issue. Thanks @AugustoMarcelo

OnurVar avatar Dec 27 '20 13:12 OnurVar

Using const sheetRef = useRef<BottomSheet>(null); instead of const sheetRef = useRef<BottomSheet>(); solved my issue. Thanks @AugustoMarcelo

When doing this I get this Typescript error

'BottomSheet' refers to a value, but is being used as a type here. Did you mean 'typeof BottomSheet'?

Any idea on how to fix this?

vpress-admin avatar May 05 '22 09:05 vpress-admin

Using const sheetRef = useRef<BottomSheet>(null); instead of const sheetRef = useRef<BottomSheet>(); solved my issue. Thanks @AugustoMarcelo

When doing this I get this Typescript error

'BottomSheet' refers to a value, but is being used as a type here. Did you mean 'typeof BottomSheet'?

Any idea on how to fix this?

@vpress-admin Did you solve the issue?

nodahikaru avatar Jun 22 '23 19:06 nodahikaru