I considered using it, but since I don't have other elements that use z-index like notifications and toasts, I decided to take a simpler approach. But if I had one of the ones mentioned before, I wouldn't hesitate to use Portals. 😎
Thanks for the comment, it is quite relevant. 🙌
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You should consider portals (reactjs.org/docs/portals.html) for modal as it scopes it out of usual DOM structure including its events.
I considered using it, but since I don't have other elements that use z-index like notifications and toasts, I decided to take a simpler approach. But if I had one of the ones mentioned before, I wouldn't hesitate to use Portals. 😎
Thanks for the comment, it is quite relevant. 🙌