How to use the redux-batched-actions.enableBatching function in redux-batched-actions

To help you get started, we’ve selected a few redux-batched-actions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mattermost / mattermost-mobile / service / store / configureStore.prod.js View on Github external
export default function configureServiceStore(preloadedState, appReducer) {
    const baseReducer = combineReducers(Object.assign({}, serviceReducer, appReducer));
    return createStore(
        enableBatching(baseReducer),
        preloadedState,
        applyMiddleware(thunk)
    );
}
github relayjs / relay-devtools / src / frontend / redux / store / configureStore.prod.js View on Github external
export default function configureStore(API) {
  const callAPIMiddleware = getAPIMiddleware(API);
  const middleware = [
    callAPIMiddleware,
    throwOnAsyncErrorMiddleware,
    thunkMiddleware,
    batchDispatchMiddleware,
  ];
  return createStore(enableBatching(reducer), applyMiddleware(...middleware));
}
github mattermost / mattermost-mobile / service / store / configureStore.dev.js View on Github external
function createReducer(...reducers) {
    const baseReducer = combineReducers(Object.assign({}, ...reducers));

    return enableFreezing(enableBatching(baseReducer));
}
github Talend / ui / packages / cmf / src / store.js View on Github external
function getReducer(appReducer) {
	let reducerObject = {};
	if (appReducer) {
		if (typeof appReducer === 'object') {
			reducerObject = Object.assign({}, appReducer);
		} else if (typeof appReducer === 'function') {
			reducerObject = { app: appReducer };
		}
	} else {
		invariant(true, 'Are you sure you want to bootstrap an app without reducers ?');
	}
	if (!reducerObject.cmf) {
		reducerObject.cmf = cmfReducers;
	}
	return enableBatching(preApplyReducer(combineReducers(reducerObject)));
}

redux-batched-actions

redux higher order reducer + action creator to reduce actions under a single subscriber notification

MIT
Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis