code handler for ChooseGymModal:
const {openModal, currentModal} = useModal(); const handleCancelModal = useCallback(() => { closeModal(currentModal, () => { openModal('ConfirmModal', { title: 'Вы точно хотите отменить выбор зала?', message: 'Будет выбран зал по умолчанию', }); }); }, []);
and when i click on cancel button who has this handler i have a warning that cyclically appears in the console
Hi , i have a warn when try close one modal and open another modal.
I have two modals: ChooseGymModal and Confirm Modal
Code: App.tsx `const modalConfig: ModalStackConfig = {ChooseGymModal, ConfirmModal}; const defaultOptions: ModalOptions = {backdropOpacity: 0.6}; const stack = createModalStack(modalConfig, defaultOptions); return (
); `
code handler for ChooseGymModal:
const {openModal, currentModal} = useModal(); const handleCancelModal = useCallback(() => { closeModal(currentModal, () => { openModal('ConfirmModal', { title: 'Вы точно хотите отменить выбор зала?', message: 'Будет выбран зал по умолчанию', }); }); }, []);
and when i click on cancel button who has this handler i have a warning that cyclically appears in the console