DEV Community

Cover image for React Portals in 3 Minutes

React Portals in 3 Minutes

Jhey Tompkins on December 17, 2019

Grasp this awesome API for escaping DOM restraints whilst creating Portals ๐Ÿ•น๐Ÿ˜Ž What is it? An API for rendering components outside of ...
Collapse
 
fly profile image
joon • Edited

I read articles about using react portals, but never really felt the need to use it itself.... until now. Modals appear to be the perfect use-case, I've been giving far too high zIndexs to my modals :)

Thank you immensely for the post Jhey. It has truly widened my perspective on coding with React.

Collapse
 
jh3y profile image
Jhey Tompkins

Hey joon ๐Ÿ‘‹
No problem! I'm glad I could help ๐Ÿ˜ŠWe can do some pretty cool things with Portals ๐Ÿ˜Ž

Collapse
 
bloycey profile image
Andrew Bloyce

I am so glad you used an example from the portal game here. Perfect.

Collapse
 
jh3y profile image
Jhey Tompkins

I felt obliged ๐Ÿ˜…I'm glad it's appreciated!

Collapse
 
burzumumbra profile image
Ronald Flores Sequeira

Really awesome introduction to Portals, I feel the need to try it.

Collapse
 
jh3y profile image
Jhey Tompkins

Thanks Ronald! ๐Ÿ˜ŠI appreciate that. Try it out, it's quite cool what opportunities it provides.