document-picker
document-picker copied to clipboard
react-native-document-picker and modals
Just pointing out a problem I've faced, react-native-document-picker was freezing the app on calling .show() at iOS whenever a modal transition was still running.
A fast workaround was using a setTimeOut with the same timer as the transition duration.
Is a setTimeout
still the preferred solution to this? It seems a little bit hacky to me - if you change your transition duration later, you have to remember to update the timeout, otherwise a (potentially very important) part of your app might become inaccessible.
Try to call it with Modal onDismiss. (ios only function)
Or you can draw your own modal with Portal with react-native-paper.
react-native modal behaviours is weird sometimes so I start to use Portal to draw all the modal components at the root of my app