Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aikoven committed May 16, 2018
1 parent dc49459 commit 1ed2596
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ console.log(action); // {type: 'SOMETHING_HAPPENED', payload: {foo: 'bar'}}
### Async Action Creators

Async Action Creators are objects with properties `started`, `done` and
`failed` whose values are action creators.
`failed` whose values are action creators. There is a number of [Companion Packages](#companion-packages) that help with binding Async Action Creators to async processes.

```ts
import actionCreatorFactory from 'typescript-fsa';
Expand Down Expand Up @@ -138,8 +138,11 @@ export const reducer = (state: State, action: Action): State => {

return state;
};
```

#### redux-observable

```ts
// epic.ts
import {Action} from 'redux';
import {Observable} from 'rxjs';
Expand All @@ -162,7 +165,7 @@ export const epic = (actions$: Observable<Action>) =>
});
```

## Companion packages
## Companion Packages

* [typescript-fsa-redux-saga](https://github.com/aikoven/typescript-fsa-redux-saga)
* [typescript-fsa-redux-observable](https://github.com/m0a/typescript-fsa-redux-observable)
Expand All @@ -184,7 +187,7 @@ Creates Action Creator factory with optional prefix for action types.
* `defaultIsError?: Predicate`: Function that detects whether action is error
given the payload. Default is `payload => payload instanceof Error`.

### `ActionCreatorFactory<Payload>(type: string, commonMeta?: object, isError?: boolean): ActionCreator<Payload>`
### `ActionCreatorFactory<Payload>#(type: string, commonMeta?: object, isError?: boolean): ActionCreator<Payload>`

Creates Action Creator that produces actions with given `type` and payload of type `Payload`.

Expand Down

0 comments on commit 1ed2596

Please sign in to comment.