Skip to content

Commit 3cb7b55

Browse files
committed
adjust note about ByTitle because there's no host Button component
1 parent 3e9bfbc commit 3cb7b55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

website/docs/MigrationV7.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ This guide describes steps necessary to migrate from `@testing-library/react-nat
5555

5656
## Missing queries
5757

58-
Our library doesn't implement `ByTitle` queries, which are targetting components with `title` prop, specifically `Button` and `RefreshControl`. To mitigate this issue, if you really need to query these components and can't figure out other way around it, you can use e.g. `UNSAFE_getByProps({title})` query.
58+
Our library doesn't implement `ByTitle` queries, which are targetting components with `title` prop, specifically `Button` and `RefreshControl`. If your tests only use `ByTitle` to target `Button` components, you can replace them with `ByText` queries, since React Native renders normal `Text` component under the hood.
59+
60+
If you need to query `RefreshControl` component and can't figure out other way around it, you can use e.g. `UNSAFE_getByProps({title})` query.
5961

6062
## No custom Jest configuration
6163

0 commit comments

Comments
 (0)