nice-modal-react
nice-modal-react copied to clipboard
Fix the issue where some dialogs cannot be closed when using nested providers
relate issues
- #100
- #141
feature
- optimize parts of the TypeScript implementation.
- the issue of being unable to close the popup when using nested providers.
sample
Please refer to the following example. You can switch the imports to see the effects before and after the fix.
https://codesandbox.io/p/sandbox/nice-modal-sample-l4hj7d?file=%2Fsrc%2FApp.tsx%3A50%2C64
and
I tried to maintain compatibility as much as possible, so I added extra parameters to the show
, hide
, and remove
methods to support dispatch definition.