Skip to content

Commit d4cee9f

Browse files
committed
Reference new ref API in components API reference
1 parent 7669b58 commit d4cee9f

9 files changed

Lines changed: 49 additions & 5 deletions

File tree

docs/activityindicator.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ Whether the indicator should hide when not animating.
7878

7979
---
8080

81+
### `ref`
82+
83+
A ref setter that will be assigned an [element node](element-nodes) when mounted.
84+
85+
---
86+
8187
### `size`
8288

8389
Size of the indicator.

docs/image.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ A string indicating which referrer to use when fetching the resource. Sets the v
334334

335335
---
336336

337+
### `ref`
338+
339+
A ref setter that will be assigned an [element node](element-nodes) when mounted.
340+
341+
---
342+
337343
### `resizeMethod` <div className="label android">Android</div>
338344

339345
The mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults to `auto`.

docs/imagebackground.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@ Inherits [Image Props](image.md#props).
7171

7272
### `imageRef`
7373

74-
Allows to set a reference to the inner `Image` component
75-
76-
| Type |
77-
| ------------------------------------------------------------- |
78-
| [Ref](https://react.dev/learn/manipulating-the-dom-with-refs) |
74+
A ref setter that will be assigned the [element node](element-nodes) of the inner `Image` component when mounted.
7975

8076
---
8177

docs/modal.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ This requires you to implement the `onRequestClose` prop to handle the dismissal
189189

190190
---
191191

192+
### `ref`
193+
194+
A ref setter that will be assigned an [element node](element-nodes) when mounted.
195+
196+
---
197+
192198
### `onRequestClose`
193199

194200
The `onRequestClose` callback is called when the user taps the hardware back button on Android or the menu button on Apple TV. Because of this required prop, be aware that `BackHandler` events will not be emitted as long as the modal is open.

docs/switch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ Invoked when the user tries to change the value of the switch. Receives the new
9696

9797
---
9898

99+
### `ref`
100+
101+
A ref setter that will be assigned an [element node](element-nodes) when mounted.
102+
103+
---
104+
99105
### `thumbColor`
100106

101107
Color of the foreground switch grip. If this is set on iOS, the switch grip will lose its drop shadow.

docs/text.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,12 @@ When the scroll view is disabled, this defines how far your touch may move off o
638638

639639
---
640640

641+
### `ref`
642+
643+
A ref setter that will be assigned an [element node](element-nodes) when mounted.
644+
645+
---
646+
641647
### `role`
642648

643649
`role` communicates the purpose of a component to the user of an assistive technology. Has precedence over the [`accessibilityRole`](text#accessibilityrole) prop.

docs/touchablehighlight.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ Called immediately after the underlay is shown.
122122

123123
---
124124

125+
### `ref`
126+
127+
A ref setter that will be assigned an [element node](element-nodes) when mounted.
128+
129+
---
130+
125131
### `style`
126132

127133
| Type |

docs/touchableopacity.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,9 @@ TV next focus up (see documentation for the View component).
143143
| Type |
144144
| ------ |
145145
| number |
146+
147+
---
148+
149+
### `ref`
150+
151+
A ref setter that will be assigned an [element node](element-nodes) when mounted.

docs/view.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,12 @@ Controls whether the `View` can be the target of touch events.
729729

730730
---
731731

732+
### `ref`
733+
734+
A ref setter that will be assigned an [element node](element-nodes) when mounted.
735+
736+
---
737+
732738
### `removeClippedSubviews`
733739

734740
This is a reserved performance property exposed by `RCTView` and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have `overflow: hidden`, as should the containing view (or one of its superviews).

0 commit comments

Comments
 (0)