Skip to content

Commit 9ce135f

Browse files
authored
Minor doc edit
1 parent 138634f commit 9ce135f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/portals.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ A typical use case for portals is when a parent component has an `overflow: hidd
4848
4949
[Try it on CodePen.](https://codepen.io/gaearon/pen/yzMaBd)
5050

51-
## Portals and event bubbling
51+
## Event Bubbling Through Portals
5252

5353
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*.
5454

@@ -139,6 +139,6 @@ function Child() {
139139
ReactDOM.render(<Parent />, appRoot);
140140
```
141141

142-
[Try it on CodePen.](https://codepen.io/gaearon/pen/jGBWpE).
142+
[Try it on CodePen.](https://codepen.io/gaearon/pen/jGBWpE)
143143

144144
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.

0 commit comments

Comments
 (0)