Skip to content

Commit add133c

Browse files
committed
Revert "GitBook: [master] 25 pages modified"
This reverts commit 055c425.
1 parent 055c425 commit add133c

File tree

21 files changed

+447
-344
lines changed

21 files changed

+447
-344
lines changed

.github/README.md

-2
This file was deleted.

.github/pull_request_template.md

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
# pull\_request\_template
1+
# Description
22

3-
## Description
3+
Describe the feature / improvement / bugfix you did. This will be in the release notes.
4+
Please refer to an issue number if there is one.
45

5-
Describe the feature / improvement / bugfix you did. This will be in the release notes. Please refer to an issue number if there is one.
6+
## Breaking changes
67

7-
### Breaking changes
8+
Does this include any (potentially) breaking API changes?
89

9-
Does this include any \(potentially\) breaking API changes?
10-
11-
## Checklist
10+
# Checklist
1211

1312
Make sure you check all the boxes. You can omit items that are not applicable.
1413

15-
* [ ] Implementation for both `<Async>` and `useAsync()`
16-
* [ ] Added / updated the unit tests
17-
* [ ] Added / updated the documentation
18-
* [ ] Updated the PropTypes
19-
* [ ] Updated the TypeScript type definitions
20-
14+
- [ ] Implementation for both `<Async>` and `useAsync()`
15+
- [ ] Added / updated the unit tests
16+
- [ ] Added / updated the documentation
17+
- [ ] Updated the PropTypes
18+
- [ ] Updated the TypeScript type definitions

contributing.md CONTRIBUTING.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ This repo relies on Yarn workspaces, so you should [install](https://yarnpkg.com
66

77
## Development guide
88

9-
Please have the _**latest**_ stable versions of the following on your machine
9+
Please have the **_latest_** stable versions of the following on your machine
1010

11-
* node
12-
* yarn
11+
- node
12+
- yarn
1313

1414
### Initial setup
1515

1616
To start working on React Async, clone the repo and bootstrap the project:
1717

18-
```bash
18+
```sh
1919
git clone https://github.com/async-library/react-async.git
2020
cd react-async
2121
yarn && yarn bootstrap && yarn test
@@ -25,17 +25,18 @@ yarn && yarn bootstrap && yarn test
2525

2626
We use Storybook as a development environment, particularly for the DevTools. Spin it up using:
2727

28-
```bash
28+
```sh
2929
yarn storybook
3030
```
3131

32-
This should open up Storybook in a browser at [http://localhost:6006/](http://localhost:6006/) Run it side-by-side with `yarn test --watch` during development. See [Testing](contributing.md#testing).
32+
This should open up Storybook in a browser at http://localhost:6006/
33+
Run it side-by-side with `yarn test --watch` during development. See [Testing](#testing).
3334

3435
### Linting
3536

3637
Use `yarn lint` to verify your code style before committing. It's highly recommended to install the Prettier and ESLint plugins for your IDE. Travis CI will fail your build on lint errors. Configure VS Code with the following settings:
3738

38-
```text
39+
```plaintext
3940
"eslint.autoFixOnSave": true,
4041
"eslint.packageManager": "yarn",
4142
"eslint.options": {
@@ -58,15 +59,15 @@ This should enable auto-fix for all source files, and give linting warnings and
5859

5960
Use the following command to test all packages in watch mode. Refer to the [Jest CLI options](https://jestjs.io/docs/en/cli#options) for details.
6061

61-
```bash
62+
```sh
6263
yarn test --watch
6364
```
6465

6566
In general, this is sufficient during development. Travis CI will apply a more rigorous set of tests.
6667

6768
#### Testing for compatibility
6869

69-
```bash
70+
```sh
7071
yarn test:compat
7172
```
7273

@@ -78,7 +79,7 @@ In the `examples` folder, you will find sample React applications that use React
7879

7980
To run sample examples on your local environments
8081

81-
```bash
82+
```sh
8283
yarn build:examples
8384
yarn test:examples
8485
yarn start:examples
@@ -87,4 +88,3 @@ yarn start:examples
8788
### Resolving issues
8889

8990
Sometimes your dependencies might end up in a weird state, causing random issues, especially when working with the examples. In this case it often helps to run `yarn clean -y && yarn bootstrap`. This will delete `node_modules` from all packages/examples and do a clean install.
90-

README.md

+363-247
Large diffs are not rendered by default.

SUMMARY.md

-17
This file was deleted.

codemods.md codemods/README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
# React Async codemods
22

3-
These codemods enable you to automatically upgrade your codebase to handle breaking changes in React Async's API.
3+
These codemods enable you to automatically upgrade your codebase to handle breaking changes in
4+
React Async's API.
45

56
## Warning
67

7-
Be aware: **codemods transform your source code in place**. Make sure that your files are in version control before running a codemod.
8+
Be aware: **codemods transform your source code in place**. Make sure that your files are in
9+
version control before running a codemod.
810

9-
These codemods come without warranty. They will work fine most of the time, but you should always verify their output. Also, **do not run a codemod more than once.**
11+
These codemods come without warranty. They will work fine most of the time, but you should always
12+
verify their output. Also, **do not run a codemod more than once.**
1013

1114
## Running a codemod
1215

13-
These codemods are based on [jscodeshift](https://github.com/facebook/jscodeshift). Refer to their docs for specifics.
16+
These codemods are based on [jscodeshift](https://github.com/facebook/jscodeshift). Refer to their
17+
docs for specifics.
1418

1519
```bash
1620
npx jscodeshift <target_dir> -t <transform_script>
1721
```
1822

19-
Where `<target_dir>` should be replaced with the path to your project's source directory and `<transform_script>` should be replaced by the URL of the codemod.
23+
Where `<target_dir>` should be replaced with the path to your project's source directory and
24+
`<transform_script>` should be replaced by the URL of the codemod.
2025

2126
For example:
2227

2328
```bash
2429
npx jscodeshift . -t https://raw.githubusercontent.com/async-library/react-async/master/codemods/v6.js
2530
```
2631

27-
This will apply the codemod for [v6](https://github.com/async-library/react-async/blob/master/codemods/v6.js) to the current working directory \(`.`\).
28-
32+
This will apply the codemod for [v6](https://github.com/async-library/react-async/blob/master/codemods/v6.js)
33+
to the current working directory (`.`).

examples/README.md

-2
This file was deleted.

examples/basic-fetch.md

-6
This file was deleted.

examples/basic-fetch/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Basic fetch with React Async
2+
3+
This demonstrates a very simple HTTP GET using `fetch`, wrapped with React Async.
4+
5+
<a href="https://react-async.async-library.now.sh/examples/basic-fetch">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/basic-hook.md

-6
This file was deleted.

examples/basic-hook/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Basic fetch with useAsync hook
2+
3+
This demonstrates how to use the `useAsync` hook.
4+
5+
<a href="https://react-async.async-library.now.sh/examples/basic-hook">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/custom-instance.md

-6
This file was deleted.

examples/custom-instance/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Custom React Async instance
2+
3+
Demonstrates how to use a preconfigured React Async instance.
4+
5+
<a href="https://react-async.async-library.now.sh/examples/custom-instance">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/movie-app.md

-6
This file was deleted.

examples/movie-app/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Movie app using React Async
2+
3+
This is a rebuild of the [React Suspense IO demo](https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html)
4+
by Dan Abramov at JSConf Iceland 2018, using React Async instead of Suspense.
5+
6+
<a href="https://react-async.async-library.now.sh/examples/movie-app">
7+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
8+
</a>

examples/with-abortcontroller.md examples/with-abortcontroller/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
This demonstrates a very simple HTTP GET using `fetch`, which gets the AbortSignal passed in to actually abort the HTTP request when the promise is canceled.
44

5-
[![](https://img.shields.io/badge/live-demo-blue.svg)](https://react-async.async-library.now.sh/examples/with-abortcontroller)
6-
5+
<a href="https://react-async.async-library.now.sh/examples/with-abortcontroller">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/with-nextjs.md

-6
This file was deleted.

examples/with-nextjs/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# React Async with Next.js
2+
3+
This demonstrates how React Async integrates with Next.js.
4+
5+
<a href="https://react-async.async-library.now.sh/examples/with-nextjs">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# README
1+
## An example of using `react-async` with `react-router` (built with parcel)
22

3-
## An example of using `react-async` with `react-router` \(built with parcel\)
3+
The idea is to make fetching data for pages (components) configurable in a declarative way.
44

5-
The idea is to make fetching data for pages \(components\) configurable in a declarative way.
6-
7-
```text
5+
```
86
<Router>
97
...
108
<ApiRouter path="/repositories" fetchUrl="https://api.github.com/repositories" component={RepositoriesComponent} />
@@ -13,10 +11,9 @@ The idea is to make fetching data for pages \(components\) configurable in a dec
1311

1412
## Running the example
1513

16-
```text
14+
```
1715
npm install
1816
npm start
1917
```
2018

2119
Then visit [http://localhost:1234](http://localhost:1234).
22-

examples/with-typescript.md

-6
This file was deleted.

examples/with-typescript/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Using React Async with TypeScript
2+
3+
This demonstrates how React Async integrates with TypeScript.
4+
5+
<a href="https://react-async.async-library.now.sh/examples/with-typescript">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

0 commit comments

Comments
 (0)