josemariagomez / momentum-modal-react

MIT License
6 stars 2 forks source link

Adds support for resolving modals without eager loading #4

Open Kaishiyoku opened 2 months ago

Kaishiyoku commented 2 months ago

I know that there already is a pull request regarding that issue (https://github.com/josemariagomez/momentum-modal-react/pull/1) but in said PR the resolveComponent call isn't treated as an asynchronous call in the useEffect call where the event listeners are being reigstered. Therefore the resolveComponent would be called at the same time when the event listeners are being registered. I don't know if that would really matter in this case but it's better to handle that in the code I think.

This PR relates to #3