This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@savchenko91/rc-redux-api-mw-query
TypeScript icon, indicating that this package has built-in type declarations

2.0.6 • Public • Published

What is it?

Simple API middleware

Usage

import { REDUX_API_MIDDLEWARE } from '@savchenko91/rc-redux-api-mw'

const SAVE_CAT = {
  START: 'CATS | SAVE | START',
  FAIL: 'CATS | SAVE | FAIL',
  SUCCESS: 'CATS | SAVE | SUCCESS',
}

const saveCat = (id, body, onSuccess) => ({
  type: REDUX_API_MIDDLEWARE,
  url: `/api/v1/cats/${id}`,
  method: 'post',
  stageActionTypes: SAVE_CAT,
  body,
  onSuccess,
})

Readme

Keywords

none

Package Sidebar

Install

npm i @savchenko91/rc-redux-api-mw-query

Weekly Downloads

8

Version

2.0.6

License

MIT

Unpacked Size

5.3 kB

Total Files

8

Last publish

Collaborators

  • savchenko91