Inspired by the example in your repo, I'm trying tu use DropDownAlert in a .tsx file simplified as follow:
import DropdownAlert from 'react-native-dropdownalert'
...
export const MyFunction=()=>{
let dropDownAlertRef = useRef(null)
...
const mySubFunction = ()=> {
dropDownAlertRef.alertWithType('success', 'You did it !' (1)
...
}
<View>
<DropdownAlert
ref={(ref) => {
if (ref) {
dropDownAlertRef = ref (2)
}
}}
/>
</View>
}
...
Steps to Reproduce / Code Snippets / Usage
Typescript says
Property 'alertWithType' does not exist on type 'MutableRefObject<any>' (1)
Property 'current' is missing in type 'DropdownAlert' but required in type 'MutableRefObject<any> (2)
Expected Results
Well the DropDownAlert doesn't show, I'd like it will ;)
Do you know what is wrong and how to fixe it ?
Short Description
Inspired by the example in your repo, I'm trying tu use DropDownAlert in a
.tsx
file simplified as follow:...
Steps to Reproduce / Code Snippets / Usage
Typescript says
Property 'alertWithType' does not exist on type 'MutableRefObject<any>'
(1)Property 'current' is missing in type 'DropdownAlert' but required in type 'MutableRefObject<any>
(2)Expected Results
Well the DropDownAlert doesn't show, I'd like it will ;) Do you know what is wrong and how to fixe it ?