tajo / react-portal

🎯 React component for transportation of modals, lightboxes, loading bars... to document.body or else.
MIT License
2.14k stars 169 forks source link

Portal break when node=document.body #211

Open hepiyellow opened 6 years ago

hepiyellow commented 6 years ago

Naively I set <Portal node={document.body} >... and it breaks with react 15 (works with 16). When I say break, I mean that the portal content is replacing the body instead of appending to it.

Until I figured out that I can simply omit the node prop, and use react-portal's default behaviour.

I just thought this is something that might either require special code handling, or at least a stronger mention in the documentation.

Thanks.