if I can return the modal straight away like ant.d...
# random
p
if I can return the modal straight away like ant.design does it, i wonโ€™t need state
l
We better make this a thread before we get yelled at...
p
sry ๐Ÿ˜„
l
Ant uses state (or abstracts it)
Anyway, you can call the component by...
Copy code
return (
    {isOpen ? <Modal /> : <Component /> }
)
p
hmm, okay. I might just do that
thank you ๐Ÿ™‚
l
Here's a great video explaining how to make a resuable Modal. In React 16, there's a
createPortal
which helps a lot too.

https://www.youtube.com/watch?v=WGjv-p9jYf0โ–พ

p
Thank you ๐ŸŽ‰