@samitouri / QOS-React / commits / 9ce135f863

Minor doc edit

Dan Abramov committed Sep 26, 2017 at 22:23 UTC 9ce135f863203943b8b10e9d3ea8d56fdb1351aa
1 file changed +2 -2
docs/docs/portals.md
+2 -2
@@ -48,7 +48,7 @@ A typical use case for portals is when a parent component has an `overflow: hidd
48
49 [Try it on CodePen.](https://codepen.io/gaearon/pen/yzMaBd)
50
51 -## Portals and event bubbling
51 +## Event Bubbling Through Portals
52
53 Even though a portal can be anywhere in the DOM tree, it behaves like a normal React child in every other way. Features like context work exactly the same regardless of whether the child is a portal, as the portal still exists in the *React tree* regardless of position in the *DOM tree*.
54
@@ -139,6 +139,6 @@ function Child() {
139 ReactDOM.render(<Parent />, appRoot);
140 ```
141
142 -[Try it on CodePen.](https://codepen.io/gaearon/pen/jGBWpE).
142 +[Try it on CodePen.](https://codepen.io/gaearon/pen/jGBWpE)
143
144 Catching an event bubbling up from a portal in a parent component allows the development of more flexible abstractions that are not inherently reliant on portals. For example, if you render a `<Modal />` component, the parent can capture its events regardless of whether it's implemented using portals.