Skip to content

Commit f7b4036

Browse files
committed
Restructure docs files.
1 parent 0367ed7 commit f7b4036

File tree

10 files changed

+32
-15
lines changed

10 files changed

+32
-15
lines changed

docs/_summary.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
## Getting started
66

7-
- [Installation](installation.md)
8-
- [Upgrading](upgrading.md)
9-
- [Usage](usage.md)
10-
- [DevTools](devtools.md)
7+
- [Installation](getting-started/installation.md)
8+
- [Upgrading](getting-started/upgrading.md)
9+
- [Usage](getting-started/usage.md)
10+
- [DevTools](getting-started/devtools.md)
1111

1212
## API
1313

14-
- [Interfaces](interfaces.md)
15-
- [Configuration options](options.md)
16-
- [State properties](state.md)
17-
- [Helper components](helpers.md)
14+
- [Interfaces](api/interfaces.md)
15+
- [Configuration options](api/options.md)
16+
- [State properties](api/state.md)
17+
- [Helper components](api/helpers.md)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/devtools.md renamed to docs/getting-started/devtools.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# DevTools
22

3-
React Async comes with a separate DevTools package which helps you Debug and develop your asynchronous application states. You can install it from npm:
3+
React Async comes with a separate DevTools package which helps you Debug and develop your asynchronous application
4+
states. You can install it from npm:
45

56
```text
67
npm install --save react-async-devtools

docs/installation.md renamed to docs/getting-started/installation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ Or if you're using Yarn:
1212
yarn add react-async
1313
```
1414

15-
> This package requires `react` as a peer dependency. Please make sure to install that as well. If you want to use the `useAsync` hook, you'll need `[email protected]` or later.
15+
> This package requires `react` as a peer dependency. Please make sure to install that as well. If you want to use the
16+
> `useAsync` hook, you'll need `[email protected]` or later.
File renamed without changes.
File renamed without changes.

docs/introduction.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
# Introduction
22

3-
React Async is a utility belt for declarative promise resolution and data fetching. It makes it easy to handle asynchronous UI states, without assumptions about the shape of your data or the type of request. React Async consists of a React component and several hooks. You can use it with `fetch`, Axios or other data fetching libraries, even GraphQL.
3+
React Async is a utility belt for declarative promise resolution and data fetching. It makes it easy to handle
4+
asynchronous UI states, without assumptions about the shape of your data or the type of request. React Async consists of
5+
a React component and several hooks. You can use it with `fetch`, Axios or other data fetching libraries, even GraphQL.
46

57
## Rationale
68

7-
React Async is different in that it tries to resolve data as close as possible to where it will be used, while using declarative syntax, using just JSX and native promises. This is in contrast to systems like Redux where you would configure any data fetching or updates on a higher \(application global\) level, using a special construct \(actions/reducers\).
9+
React Async is different in that it tries to resolve data as close as possible to where it will be used, while using
10+
declarative syntax, using just JSX and native promises. This is in contrast to systems like Redux where you would
11+
configure any data fetching or updates on a higher (application global) level, using a special construct
12+
(actions/reducers).
813

9-
React Async works well even in larger applications with multiple or nested data dependencies. It encourages loading data on-demand and in parallel at component level instead of in bulk at the route/page level. It's entirely decoupled from your routes, so it works well in complex applications that have a dynamic routing model or don't use routes at all.
14+
React Async works well even in larger applications with multiple or nested data dependencies. It encourages loading data
15+
on-demand and in parallel at component level instead of in bulk at the route/page level. It's entirely decoupled from
16+
your routes, so it works well in complex applications that have a dynamic routing model or don't use routes at all.
1017

1118
React Async is promise-based, so you can resolve anything you want, not just `fetch` requests.
1219

1320
## Concurrent React and Suspense
1421

15-
The React team is currently working on a large rewrite called [Concurrent React](https://github.com/sw-yx/fresh-concurrent-react/blob/master/Intro.md#introduction-what-is-concurrent-react), previously known as "Async React". Part of this rewrite is Suspense, which is a generic way for components to suspend rendering while they load data from a cache. It can render a fallback UI while loading data, much like `<Async.Pending>`.
22+
The React team is currently working on a large rewrite called [Concurrent React], previously known as "Async React".
23+
Part of this rewrite is Suspense, which is a generic way for components to suspend rendering while they load data from a
24+
cache. It can render a fallback UI while loading data, much like `<Async.Pending>`.
1625

17-
React Async has no direct relation to Concurrent React. They are conceptually close, but not the same. React Async is meant to make dealing with asynchronous business logic easier. Concurrent React will make those features have less impact on performance and usability. When Suspense lands, React Async will make full use of Suspense features. In fact, you can already **start using React Async right now**, and in a later update, you'll **get Suspense features for free**. In fact, React Async already has experimental support for Suspense, by passing the `suspense` option.
26+
React Async has no direct relation to Concurrent React. They are conceptually close, but not the same. React Async is
27+
meant to make dealing with asynchronous business logic easier. Concurrent React will make those features have less
28+
impact on performance and usability. When Suspense lands, React Async will make full use of Suspense features. In fact,
29+
you can already **start using React Async right now**, and in a later update, you'll **get Suspense features for free**.
30+
In fact, React Async already has experimental support for Suspense, by passing the `suspense` option.
31+
32+
[concurrent react]: https://github.com/sw-yx/fresh-concurrent-react/blob/master/Intro.md#introduction-what-is-concurrent-react

0 commit comments

Comments
 (0)