Skip to content

Commit 36ff384

Browse files
committed
Update documentation to add react portal support
1 parent 0e715b5 commit 36ff384

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ const usernameInputElement = getByTestId('username-input')
330330
### `renderIntoDocument`
331331

332332
Render into `document.body`. Should be used with [cleanup](#cleanup).
333-
`renderIntoDocument` will return the same object as [render](#render)
333+
`renderIntoDocument` will return the same object as [render](#render) but with test utilities exposed for `document.body` rather than the component alone.
334+
This helps to test [React portal](https://reactjs.org/docs/portals.html) elements.
334335

335336
```javascript
336337
import {renderIntoDocument} from 'react-testing-library'

0 commit comments

Comments
 (0)