Skip to content

Commit 18f76fc

Browse files
docs(components): fix grammar + typos (#10649)
1 parent 2e74a9f commit 18f76fc

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

docs/components/form.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Form
66

77
A progressively enhanced HTML [`<form>`][form_element] that submits data to actions via `fetch`, activating pending states in `useNavigation` which enables advanced user interfaces beyond a basic HTML form. After a form's action completes, all data on the page is automatically revalidated from the server to keep the UI in sync with the data.
88

9-
Because it uses the HTML form API, server rendered pages are interactive at a basic level before JavaScript loads. Instead of Remix managing the submission, the browser manages the submission as well as the pending states (like the spinning favicon). After JavaScript loads, Remix takes over enabling web application user experiences.
9+
Because it uses the HTML form API, server-rendered pages are interactive at a basic level before JavaScript loads. Instead of Remix managing the submission, the browser manages the submission as well as the pending states (like the spinning favicon). After JavaScript loads, Remix takes over enabling web application user experiences.
1010

1111
Form is most useful for submissions that should also change the URL or otherwise add an entry to the browser history stack. For forms that shouldn't manipulate the browser history stack, use [`<fetcher.Form>`][fetcher_form].
1212

@@ -79,7 +79,7 @@ If you are using [`<ScrollRestoration>`][scroll_restoration_component], this let
7979

8080
### `replace`
8181

82-
Replaces the current entry in the history stack, instead of pushing the new entry.
82+
Replaces the current entry in the history stack instead of pushing the new entry.
8383

8484
```tsx
8585
<Form replace />

docs/components/link.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Link } from "@remix-run/react";
1818

1919
### `to: string`
2020

21-
The most basic usage takes an href string:
21+
The most basic usage takes an `href` string:
2222

2323
```tsx
2424
<Link to="/some/path" />
@@ -49,8 +49,8 @@ Defines the route discovery behavior when using [`future.v3_lazyRouteDiscovery`]
4949
</>
5050
```
5151

52-
- **render** - default, discover the route when the link renders
53-
- **none** - don't eagerly discover, only discover if the link is clicked
52+
- **render** default, discover the route when the link renders
53+
- **none** don't eagerly discover, only discover if the link is clicked
5454

5555
### `prefetch`
5656

@@ -66,10 +66,10 @@ Defines the data and module prefetching behavior for the link.
6666
</>
6767
```
6868

69-
- **none** - default, no prefetching
70-
- **intent** - prefetches when the user hovers or focuses the link
71-
- **render** - prefetches when the link renders
72-
- **viewport** - prefetches when the link is in the viewport, very useful for mobile
69+
- **none** default, no prefetching
70+
- **intent** prefetches when the user hovers or focuses the link
71+
- **render** prefetches when the link renders
72+
- **viewport** prefetches when the link is in the viewport, very useful for mobile
7373

7474
Prefetching is done with HTML `<link rel="prefetch">` tags. They are inserted after the link.
7575

@@ -136,8 +136,8 @@ Defines the relative path behavior for the link.
136136
<Link relative="path" />;
137137
```
138138

139-
- **route** - default, relative to the route hierarchy so `..` will remove all URL segments of the current route pattern
140-
- **path** - relative to the path so `..` will remove one URL segment
139+
- **route** default, relative to the route hierarchy so `..` will remove all URL segments of the current route pattern
140+
- **path** relative to the path so `..` will remove one URL segment
141141

142142
### `reloadDocument`
143143

@@ -168,7 +168,7 @@ A -> C
168168

169169
### `state`
170170

171-
Adds persistent client side routing state to the next location.
171+
Adds a persistent client side routing state to the next location.
172172

173173
```tsx
174174
<Link to="/somewhere/else" state={{ some: "value" }} />

docs/components/prefetch-page-links.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ toc: false
55

66
# `<PrefetchPageLinks />`
77

8-
This component enables prefetching of all assets for a page to enable an instant navigation to that page. It does this by rendering `<link rel="prefetch">` and `<link rel="modulepreload"/>` tags for all the assets (data, modules, css) of a given page.
8+
This component enables prefetching of all assets for a page to enable an instant navigation to that page. It does this by rendering `<link rel="prefetch">` and `<link rel="modulepreload"/>` tags for all the assets (data, modules, CSS) of a given page.
99

1010
`<Link rel="prefetch">` uses this internally, but you can render it to prefetch a page for any other reason.
1111

docs/components/scroll-restoration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Optional. Defines the key used to restore scroll positions.
4646

4747
<summary>Discussion</summary>
4848

49-
Using `location.key` emulates the browser's default behavior. The user can navigate to the same URL multiple times in the stack and each entry gets its own scroll position to restore.
49+
Using `location.key` emulates the browser's default behavior. The user can navigate to the same URL multiple times in the stack, and each entry gets its own scroll position to restore.
5050

5151
Some apps may want to override this behavior and restore position based on something else. Consider a social app that has four primary pages:
5252

@@ -55,7 +55,7 @@ Some apps may want to override this behavior and restore position based on somet
5555
- "/notifications"
5656
- "/search"
5757

58-
If the user starts at "/home", scrolls down a bit, clicks "messages" in the navigation menu, then clicks "home" in the navigation menu (not the back button!) there will be three entries in the history stack:
58+
If the user starts at `"/home"`, scrolls down a bit, clicks `"messages"` in the navigation menu, then clicks `"home"` in the navigation menu (not the back button!) there will be three entries in the history stack:
5959

6060
```
6161
1. /home
@@ -65,7 +65,7 @@ If the user starts at "/home", scrolls down a bit, clicks "messages" in the navi
6565

6666
By default, React Router (and the browser) will have two different scroll positions stored for `1` and `3` even though they have the same URL. That means as the user navigated from `2``3` the scroll position goes to the top instead of restoring to where it was in `1`.
6767

68-
A solid product decision here is to keep the users scroll position on the home feed no matter how they got there (back button or new link clicks). For this, you'd want to use the `location.pathname` as the key.
68+
A solid product decision here is to keep the users' scroll position on the home feed no matter how they got there (back button or new link clicks). For this, you'd want to use the `location.pathname` as the key.
6969

7070
```tsx
7171
<ScrollRestoration
@@ -75,7 +75,7 @@ A solid product decision here is to keep the users scroll position on the home f
7575
/>
7676
```
7777

78-
Or you may want to only use the pathname for some paths, and use the normal behavior for everything else:
78+
Or you may want to only use the pathname for some paths and use the normal behavior for everything else:
7979

8080
```tsx
8181
<ScrollRestoration

0 commit comments

Comments
 (0)