Skip to content

Commit

Permalink
Revert "GitBook: [master] 25 pages modified"
Browse files Browse the repository at this point in the history
This reverts commit 055c425.
  • Loading branch information
ghengeveld committed Oct 7, 2019
1 parent 055c425 commit add133c
Show file tree
Hide file tree
Showing 21 changed files with 447 additions and 344 deletions.
2 changes: 0 additions & 2 deletions .github/README.md

This file was deleted.

24 changes: 11 additions & 13 deletions .github/pull_request_template.md
@@ -1,20 +1,18 @@
# pull\_request\_template
# Description

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

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

### Breaking changes
Does this include any (potentially) breaking API changes?

Does this include any \(potentially\) breaking API changes?

## Checklist
# Checklist

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

* [ ] Implementation for both `<Async>` and `useAsync()`
* [ ] Added / updated the unit tests
* [ ] Added / updated the documentation
* [ ] Updated the PropTypes
* [ ] Updated the TypeScript type definitions

- [ ] Implementation for both `<Async>` and `useAsync()`
- [ ] Added / updated the unit tests
- [ ] Added / updated the documentation
- [ ] Updated the PropTypes
- [ ] Updated the TypeScript type definitions
22 changes: 11 additions & 11 deletions contributing.md → CONTRIBUTING.md
Expand Up @@ -6,16 +6,16 @@ This repo relies on Yarn workspaces, so you should [install](https://yarnpkg.com

## Development guide

Please have the _**latest**_ stable versions of the following on your machine
Please have the **_latest_** stable versions of the following on your machine

* node
* yarn
- node
- yarn

### Initial setup

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

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

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

```bash
```sh
yarn storybook
```

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).
This should open up Storybook in a browser at http://localhost:6006/
Run it side-by-side with `yarn test --watch` during development. See [Testing](#testing).

### Linting

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:

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

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.

```bash
```sh
yarn test --watch
```

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

#### Testing for compatibility

```bash
```sh
yarn test:compat
```

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

To run sample examples on your local environments

```bash
```sh
yarn build:examples
yarn test:examples
yarn start:examples
Expand All @@ -87,4 +88,3 @@ yarn start:examples
### Resolving issues

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.

610 changes: 363 additions & 247 deletions README.md

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions SUMMARY.md

This file was deleted.

19 changes: 12 additions & 7 deletions codemods.md → codemods/README.md
@@ -1,28 +1,33 @@
# React Async codemods

These codemods enable you to automatically upgrade your codebase to handle breaking changes in React Async's API.
These codemods enable you to automatically upgrade your codebase to handle breaking changes in
React Async's API.

## Warning

Be aware: **codemods transform your source code in place**. Make sure that your files are in version control before running a codemod.
Be aware: **codemods transform your source code in place**. Make sure that your files are in
version control before running a codemod.

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.**
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.**

## Running a codemod

These codemods are based on [jscodeshift](https://github.com/facebook/jscodeshift). Refer to their docs for specifics.
These codemods are based on [jscodeshift](https://github.com/facebook/jscodeshift). Refer to their
docs for specifics.

```bash
npx jscodeshift <target_dir> -t <transform_script>
```

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.
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.

For example:

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

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

This will apply the codemod for [v6](https://github.com/async-library/react-async/blob/master/codemods/v6.js)
to the current working directory (`.`).
2 changes: 0 additions & 2 deletions examples/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions examples/basic-fetch.md

This file was deleted.

7 changes: 7 additions & 0 deletions examples/basic-fetch/README.md
@@ -0,0 +1,7 @@
# Basic fetch with React Async

This demonstrates a very simple HTTP GET using `fetch`, wrapped with React Async.

<a href="https://react-async.async-library.now.sh/examples/basic-fetch">
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
</a>
6 changes: 0 additions & 6 deletions examples/basic-hook.md

This file was deleted.

7 changes: 7 additions & 0 deletions examples/basic-hook/README.md
@@ -0,0 +1,7 @@
# Basic fetch with useAsync hook

This demonstrates how to use the `useAsync` hook.

<a href="https://react-async.async-library.now.sh/examples/basic-hook">
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
</a>
6 changes: 0 additions & 6 deletions examples/custom-instance.md

This file was deleted.

7 changes: 7 additions & 0 deletions examples/custom-instance/README.md
@@ -0,0 +1,7 @@
# Custom React Async instance

Demonstrates how to use a preconfigured React Async instance.

<a href="https://react-async.async-library.now.sh/examples/custom-instance">
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
</a>
6 changes: 0 additions & 6 deletions examples/movie-app.md

This file was deleted.

8 changes: 8 additions & 0 deletions examples/movie-app/README.md
@@ -0,0 +1,8 @@
# Movie app using React Async

This is a rebuild of the [React Suspense IO demo](https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html)
by Dan Abramov at JSConf Iceland 2018, using React Async instead of Suspense.

<a href="https://react-async.async-library.now.sh/examples/movie-app">
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
</a>
Expand Up @@ -2,5 +2,6 @@

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.

[![](https://img.shields.io/badge/live-demo-blue.svg)](https://react-async.async-library.now.sh/examples/with-abortcontroller)

<a href="https://react-async.async-library.now.sh/examples/with-abortcontroller">
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
</a>
6 changes: 0 additions & 6 deletions examples/with-nextjs.md

This file was deleted.

7 changes: 7 additions & 0 deletions examples/with-nextjs/README.md
@@ -0,0 +1,7 @@
# React Async with Next.js

This demonstrates how React Async integrates with Next.js.

<a href="https://react-async.async-library.now.sh/examples/with-nextjs">
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
</a>
@@ -1,10 +1,8 @@
# README
## An example of using `react-async` with `react-router` (built with parcel)

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

The idea is to make fetching data for pages \(components\) configurable in a declarative way.

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

## Running the example

```text
```
npm install
npm start
```

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

6 changes: 0 additions & 6 deletions examples/with-typescript.md

This file was deleted.

7 changes: 7 additions & 0 deletions examples/with-typescript/README.md
@@ -0,0 +1,7 @@
# Using React Async with TypeScript

This demonstrates how React Async integrates with TypeScript.

<a href="https://react-async.async-library.now.sh/examples/with-typescript">
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
</a>

0 comments on commit add133c

Please sign in to comment.