Closed bryce-mcmath closed 3 months ago
hey @bryce-mcmath!
thanks for the kind words, much appreciated!
regarding your question: yes, that's something you can do.
modalfy actually makes interacting with modals from a modal component even easier: each one of them automatically receives a modal
object in their props, meaning no hooks needed!
here is an example of that with what you asked but with closeModal
(the approach is the same with closeAllModals
): https://colorfy-software.gitbook.io/react-native-modalfy/guides/opening-closing#id-2.-from-a-modal-component
For example, within a modal component, can I use
const { closeAllModals } = useModal()
and then callcloseAllModals()
when some action is performed in that modal?Thank you so much for this wonderful library! Appreciate any help