Skip to content

Commit de2c5cf

Browse files
yeion7Kent C. Dodds
authored and
Kent C. Dodds
committed
docs: change renderIntoDocument to render (#128)
1 parent cb14d2d commit de2c5cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,9 @@ Convenience methods for firing DOM events. Check out
492492
for a full list as well as default `eventProperties`.
493493
494494
```javascript
495-
import {renderIntoDocument, fireEvent} from 'react-testing-library'
495+
import {render, fireEvent} from 'react-testing-library'
496496

497-
const {getElementByText} = renderIntoDocument(<Form />)
497+
const {getElementByText} = render(<Form />)
498498

499499
// similar to the above example
500500
// click will bubble for React to see it
@@ -511,9 +511,9 @@ won't work like it does with `Simulate`. You need to change the element's
511511
`value` property, then use `fireEvent` to fire a `change` DOM event.
512512
513513
```javascript
514-
import {renderIntoDocument, fireEvent} from 'react-testing-library'
514+
import {render, fireEvent} from 'react-testing-library'
515515

516-
const {getByLabelText} = renderIntoDocument(<Form />)
516+
const {getByLabelText} = render(<Form />)
517517

518518
const comment = getByLabelText('Comment')
519519
comment.value = 'Great advice, I love your posts!'

0 commit comments

Comments
 (0)