1.0.1 • Published 5 years ago
@jeemyeong/redux-confirm v1.0.1
redux-confirm
redux-confirm
is a Redux middleware for user to control specific actions
Features
- Written in TypeScript.
Installation
$ npm i @jeemyeong/redux-confirm
Configuration
import { applyMiddleware, compose, createStore } from 'redux';
import reduxConfirm from '@jeemyeong/redux-confirm';
import reducer from './store/reducer';
// Create the Redux store.
const store = createStore(
reducer,
applyMiddleware(reduxConfirm())
);
You may also pass options to the reduxConfirm
function.
Available options
interface Options {
confirm?: () => boolean | Promise<boolean>;
filter?: (action: Action) => boolean | Promise<boolean>;
rejectedCallback?: () => void;
}