Cause this issue, I don't want to use useModal outside modal.
So want to use NiceModal with NiceModal.show(), hide(), remove() outside modal(Not using useModal).
show, and hide function has no problem. But remove function doesn't accept modal and only accept modal Id.
I know I could declaratively set modalId with ModalDef or register, but It defeat the pros of NiceModal.
So I wonder is it possible to use remove() with just modal component something like this.
https://github.com/eBay/nice-modal-react/issues/58
Cause this issue, I don't want to use useModal outside modal. So want to use NiceModal with NiceModal.show(), hide(), remove() outside modal(Not using useModal). show, and hide function has no problem. But remove function doesn't accept modal and only accept modal Id. I know I could declaratively set modalId with ModalDef or register, but It defeat the pros of NiceModal.
So I wonder is it possible to use remove() with just modal component something like this.