React - Portal
Portals allow you to render some children into a different part of the DOM. This means that you can create some part of the html that will not be placed inside the parents structure, but in a separate place.
This is especially useful to create elements like modals that typically are placed over whole content of the website. This mechanizm can be also used when react application is only a part of the website and your code needs to place some elements outside of the root element DOM tree
Outside root
I can use react app that is rendering only part of the whole website and render parts of the UI outside root element's DOM
Custom modals
I can create custom modals implementation using Portals that can be stacked and displayed parallelly
I can use react app that is rendering only part of the whole website and render parts of the UI outside root element's DOM
I can create custom modals implementation using Portals that can be stacked and displayed parallelly