Skip to content

Commit c8ef288

Browse files
committed
Fix links.
1 parent 4c60795 commit c8ef288

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

docs/guide/async-actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Fetching data for display alone isn't sufficient for most applications. You'll often also want to submit data back to
44
the server, or handle other types of asynchronous actions. To enable this, React Async has the concept of a
5-
[`deferFn`](api/options.md#deferfn).
5+
[`deferFn`](../api/options.md#deferfn).
66

77
Like `promiseFn`, a `deferFn` is a function that returns a Promise. The difference is that `deferFn` will not be
88
automatically invoked by React Async when rendering the component. Instead it will have to be triggered by calling the
9-
[`run`](api/state.md#run) function provided by React Async.
9+
[`run`](../api/state.md#run) function provided by React Async.
1010

1111
```jsx
1212
import React, { useState } from "react"
@@ -44,7 +44,7 @@ the `args` array at the first index using [array destructuring] and pass it alon
4444

4545
## Sending data with `useFetch`
4646

47-
The above example can be simplified when we rely on [`useFetch`](api/interfaces.md#usefetch-hook) instead of
47+
The above example can be simplified when we rely on [`useFetch`](../api/interfaces.md#usefetch-hook) instead of
4848
constructing the request manually.
4949

5050
```jsx
@@ -72,5 +72,5 @@ const NewsletterForm = () => {
7272
}
7373
```
7474

75-
The [`run`](api/state.md#run) function for `useFetch` is a little special because it allows you to override the
75+
The [`run`](../api/state.md#run) function for `useFetch` is a little special because it allows you to override the
7676
request's resource and other params. This way you can pass in the body, add dynamic headers or override the URL.

docs/guide/async-components.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ good practice.
1313
## Creating an async component with `useFetch`
1414

1515
The easiest way to create an async component for data fetching is through the
16-
[`useFetch` hook](api/interfaces.md#usefetch-hook):
16+
[`useFetch` hook](../api/interfaces.md#usefetch-hook):
1717

1818
```jsx
1919
import React from "react"
@@ -37,12 +37,12 @@ const App = () => {
3737

3838
For most data fetching needs, `useFetch` is sufficient. However, sometimes you may want to take full control, for
3939
example if you want to combine multiple requests. In this case you can use the
40-
[`useAsync` hook](api/interfaces.md#useasync-hook).
40+
[`useAsync` hook](../api/interfaces.md#useasync-hook).
4141

42-
The core concept of `useAsync` (and React Async in general), is the [`promiseFn`](api/options.md#promisefn): a function
43-
that returns a `Promise`. It's the fundamental concept for modelling asynchronous operations. It enables React Async to
44-
take control over scheduling, the Promise lifecycle and things like (re)starting an operation on user action or other
45-
changes. We've deliberately chosen the `Promise` as our primitive, because it's natively supported and has various
42+
The core concept of `useAsync` (and React Async in general), is the [`promiseFn`](../api/options.md#promisefn): a
43+
function that returns a `Promise`. It's the fundamental concept for modelling asynchronous operations. It enables React
44+
Async to take control over scheduling, the Promise lifecycle and things like (re)starting an operation on user action or
45+
other changes. We've deliberately chosen the `Promise` as our primitive, because it's natively supported and has various
4646
utility methods like `Promise.all`. That's also why you'll find our terminology closely follows the Promise [states and
4747
fates].
4848

docs/guide/optimistic-updates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ might be able to predict the outcome of the operation. If so, you can implement
55
setting the `data` to the predicted value, when starting the async action. Once the action completes, it will update
66
`data` to the actual value, probably the same value as predicted.
77

8-
The following example uses both `promiseFn` and `deferFn` along with [`setData`](api/state.md#setdata) to implement
8+
The following example uses both `promiseFn` and `deferFn` along with [`setData`](../api/state.md#setdata) to implement
99
optimistic updates.
1010

1111
```jsx

docs/guide/separating-view-logic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ const App = () => {
4040
## Cleaning up the JSX
4141

4242
You'll notice the render props pattern is very powerful, but can also lead to code that's hard to read and understand.
43-
To make your JSX more declarative and less cluttered, you can use the [`<Async>`](api/interfaces.md#async-component)
44-
component and its [state helpers](api/helpers.md). These take away the need for `if/else` statements and `return`
43+
To make your JSX more declarative and less cluttered, you can use the [`<Async>`](../api/interfaces.md#async-component)
44+
component and its [state helpers](../api/helpers.md). These take away the need for `if/else` statements and `return`
4545
keywords in your JSX.
4646

4747
```jsx

docs/guide/server-side-rendering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
There's a good chance you're using React with Server-side rendering (SSR), as many applications require this to be
44
successful. If you happen to be using Next.js, it's really easy to integrate React Async. The crux is in setting a
5-
[`initialValue`](api/options.md#initialvalue), which is fetched server-side for initial page loads and passed along
5+
[`initialValue`](../api/options.md#initialvalue), which is fetched server-side for initial page loads and passed along
66
through rehydration.
77

88
```jsx

0 commit comments

Comments
 (0)