An open API service indexing awesome lists of open source software.

https://github.com/sony/typescript-fsa-redux-middleware

Fluent syntax for defining typesafe Redux vanilla middlewares on top of typescript-fsa.
https://github.com/sony/typescript-fsa-redux-middleware

Last synced: 6 months ago
JSON representation

Fluent syntax for defining typesafe Redux vanilla middlewares on top of typescript-fsa.

Awesome Lists containing this project

README

          

# TypeScript FSA Redux Middleware

Fluent syntax for defining typesafe Redux vanilla middlewares on top of [typescript-fsa](https://github.com/aikoven/typescript-fsa).

This library is inspired by [typescript-fsa-reducers](https://github.com/dphilipson/typescript-fsa-reducers).

# Introduction

The major usage of this library is as look like this:
```
import {middleware} from 'typescript-fsa-redux-middleware';

const middleware = middleware()
.case(fetchSomething.done, (api, next, action) => {
// Do followup manipulation of the API access
})

.case(fetchSomething.failed, (api, next, action) => {
// Do error handling
})
```

# Sample Application
Let you check sample application on [sample/](./sample/) folder.

# License
MIT

# Copyright
Copyright (c) 2018-2019 Sony Corporation.