The useModal hook
To use this hook, you must:
Making a modal compatible with useModal
Assuming you have a component named MyModal, that renders your modal:
useModal, apply these changes:
Register a modal
After you’ve made your modal compatible withuseModal, register it in the extension’s Configuration in your index.ts:
Open a modal
Once your modal is compatible withuseModal and it is registered, you can open it as follows:
Notice how you can pass initial props to your modal component and define its
props interface using TypeScript.