Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Migration to V1

Tung Vu edited this page May 2, 2017 · 2 revisions

Migrating redux-api-call from V0 to V1 is very simple. The only breaking change is:

in v1 redux-api-call exports middleware as a complete redux middleware (instead of a factory in v0)

To use v1, you only need to go to where you imported { middleware } from 'redux-api-call', find the line you call middleware() (note that you might renamed it to something else, eg. apiMiddleware) and remove the ().

In case you are using a custom adapter, you will have to use createAPIMiddleware (read more here). However, most of the time, the change is straight-forward.

The most frequent case I know is that you were using an adapter to handle non-json response. Solution: just use the default middleware as it's supported by default in v1.

If you have any trouble with migration, please open an issue and we can help you investigate a solution.

Clone this wiki locally