In my react-native application i use some alerts to display messages to the user.
On android everything works fine, but in ios i get following error, every time i try to display an alert:
Warning: Attempt to present <UIAlertController: 0x1030fb600> on <RCTModalHostViewController: 0x1021ad720> whose view is not in the window hierarchy!
i call the alert message via:
this.setState({spinner: true}, () => { eventHandler .joinEventById(eventCode, qrHash) .then((response) => { this.setState({spinner: false}, () => { Toast.show('Event Registrierung erfolgreich'); }); }) .catch((error) => { this.setState({spinner: false}, () => funcHelper.showAlert('Fehler beim Beitritt', error, null), ); });});
i found some solutions to fix it but only for native code, not for the react version.
Can someone give me a hint how i cant fix this or whats the reason for this error