Skip to content

Commit 8778012

Browse files
authored
chore(docs): improve render and queries description (#191)
1 parent a467aaa commit 8778012

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/API.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,19 @@ import { render } from 'react-native-testing-library';
3131
const { getByTestId, getByText /*...*/ } = render(<Component />);
3232
```
3333

34-
Returns a `RenderResult` object with [Queries](./Queries.md) and following helpers:
34+
The `render` method returns a `RenderResult` object that has a few properties:
35+
36+
### `...queries`
37+
38+
The most important feature of `render` is providing a set of helpful queries that allow you to find certain elements in the view hierarchy.
39+
40+
See [Queries](./Queries.md) for a complete list.
41+
42+
#### Example
43+
44+
```jsx
45+
const { getByText, queryByA11yRole } = render(<Component />);
46+
```
3547

3648
### `update`
3749

0 commit comments

Comments
 (0)