react-native-modalbox
react-native-modalbox copied to clipboard
Using String Literals ref is depracated
How do I fix this issue when using the modal box please ?
Insert this on your constructor
constructor(props) { super(props); this.modalRef = null }
Update your ref attribute on your modal Component to
<Modal ref={element => this.modalRef = element} > </Modal>
and use this.modalRef
to access Modal's function
Source: React Documenation