r/reactjs • • Sep 26 '17

React v16.0 - React Blog

https://facebook.github.io/react/blog/2017/09/26/react-v16.0.html
219 Upvotes

37 comments sorted by

View all comments

Show parent comments

4

u/goomba870 Sep 26 '17

Could you provide one or two? It's not obvious to me what they could be used for.

25

u/Uknight Sep 26 '17

We use them for modals mostly, i.e. I probably want my <Modal /> component to live logically inside one component, but have it render somewhere else usually document.body

Here's an example

4

u/Devvvvvv Sep 27 '17

I always render my modals in a container div with position: fixed; so I have never encountered the need for this. Is there something wrong with this approach?

6

u/kovensky Sep 27 '17

z-index fighting