Skip to content

Commit 870e4e7

Browse files
committed
Fix missing hyperlinks and minor nits
1 parent 0acf2f2 commit 870e4e7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/virtualview.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ When it is the descendent of a [`ScrollView`](scrollview), it gains additional v
1919
</ScrollView>
2020
```
2121

22-
A `VirtualView` without an ancestor `ScrollView` does not have any virtualization capabilities.
22+
A `VirtualView` without an ancestor[`ScrollView`](scrollview) does not have any virtualization capabilities.
2323

2424
## Virtualization
2525

2626
When a `VirtualView` leaves the visible region of a [`ScrollView`](scrollview), it becomes hidden. When hidden, a `VirtualView` will cache its most recent layout and may unmount its children — a process called virtualization.
2727

28-
When a `VirtualView` returns to the visible region of a `ScrollView`, it becomes visible. When visible, its children are *guaranteed* to be rendered. This guarantee is maintained by blocking the main thread from rendering the next frame that would reveal the `VirtualView` until its children can be rendered.
28+
When a `VirtualView` returns to the visible region of a [`ScrollView`](scrollview), it becomes visible. When visible, its children are *guaranteed* to be rendered. This guarantee is maintained by blocking the main thread from rendering the next frame that would reveal the `VirtualView` until its children can be rendered.
2929

3030
<img src="/docs/assets/d_virtualview_modes.svg" width="700" alt="Diagram of VirtualView modes and thresholds." />
3131

@@ -71,10 +71,10 @@ Invoked when the `VirtualView` changes how it renders its children.
7171

7272
If a callback is supplied, it may be invoked from different threads and priorities depending on the internal state change. This can be detected by checking the `mode` property on the event:
7373

74-
- If `mode` is `VirtualViewMode.Visible`, the callback is being invoked from the main thread with immediate priority.
75-
- If `mode` is `VirtualViewMode.Prerender` or `VirtualViewMode.Hidden`, the callback is being invoked from a background thread with transition priority.
74+
- If `mode` is [`VirtualViewMode.Visible`](#virtualviewmode), the callback is being invoked from the main thread with immediate priority.
75+
- If `mode` is [`VirtualViewMode.Prerender`](#virtualviewmode) or [`VirtualViewMode.Hidden`](#virtualviewmode), the callback is being invoked from a background thread with transition priority.
7676

77-
The callback will never be invoked consecutively with the same `mode` value. However, there are few guarantees about sequencing of events. Also, the callback may never be invoked with `VirtualViewMode.Visible` even if it becomes visible, if the children were successfully prerendered.
77+
The callback will never be invoked consecutively with the same `mode` value. However, there are few guarantees about sequencing of events. Also, the callback may never be invoked with [`VirtualViewMode.Visible`](#virtualviewmode) even if it becomes visible, if the children were successfully prerendered.
7878

7979
| Type |
8080
| -------------------------------------------------- |
@@ -122,7 +122,7 @@ Argument supplied to [`onModeChange`](#onmodechange).
122122
:::note
123123
For example, if a `VirtualView` enters the visible region of a [`ScrollView`](scrollview)...
124124

125-
- `mode` would be `VirtualViewMode.Visible`
125+
- `mode` would be [`VirtualViewMode.Visible`](#virtualviewmode)
126126
- `thresholdRect` would describe the current scroll position of the nearest ancestor [`ScrollView`](scrollview)
127127
- `targetRect` would be the layout of `target` that overlaps with `thresholdRect` (i.e. it is within the visible region of the [`ScrollView`](scrollview))
128128

@@ -150,7 +150,7 @@ static createHiddenVirtualView(height: number): typeof VirtualView;
150150

151151
`VirtualView` initially renders its children as visible, even if it is initially obscured by an ancestor [`ScrollView`](scrollview). This is because when a component is initially rendered, the presence of an ancestor [`ScrollView`](scrollview) — let alone its size and scroll position — are unknown.
152152

153-
For advanced use cases, `createHiddenVirtualView` creates a component that renders an initially hidden `VirtualView` with the supplied estimated layout.
153+
For advanced use cases, `createHiddenVirtualView()` creates a component that renders an initially hidden `VirtualView` with the supplied estimated layout.
154154

155155
```tsx
156156
const HiddenVirtualView = createHiddenVirtualView(100);

0 commit comments

Comments
 (0)