2.3.1 • Published 3 years ago

@sensenet/redux-promise-middleware v2.3.1

Weekly downloads
-
License
GPL-2.0
Repository
github
Last release
3 years ago

@sensenet/redux-promise-middleware

sensenet's redux promise middleware enables handling of async actions in Redux based on Redux Promise Middleware. This middleware is a custom implementation of the mentioned one so install, include and use it the same way except that:

  • it needs a repository as an input param, so that sensenet repository and the related API can be used inside Actions,
  • it does not have a customizable config
  • Action suffixes are hardcoded (LOADING, SUCCESS, FAILURE)
  • Action delimiter is hardcoded '_'

NPM version NPM downloads License: GPL v2

Install

# Yarn
yarn add @sensenet/redux-promise-middleware

# NPM
npm install @sensenet/redux-promise-middleware

Setup

import { Repository } from '@sensenet/client-core'
import { promiseMiddleware } from '@sensenet/redux-promise-middleware'

const repository = new Repository({ repositoryUrl: 'https://mySensenetSite.com' })

...

const store = createStore(
    rootReducer,
    persistedState,
    applyMiddleware([promiseMiddleware(repository)]),
)

Use

About how to use it with Actions check @sensenet/redux docs.

2.3.1

3 years ago

2.3.0

3 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.14

4 years ago

2.1.13

4 years ago

2.1.12

4 years ago

2.1.11

4 years ago

2.1.10

5 years ago

2.1.9

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.1-alpha.0

5 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago