How to use the reduxsauce.Types.DEFAULT function in reduxsauce

To help you get started, we’ve selected a few reduxsauce 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 Twotalltotems / react-native-paginatable / PaginatableListExample / src / Reducers / index.js View on Github external
const getRootReducer = asyncReducers => {
	const appReducer = getCombinedReducers(asyncReducers)

	return createReducer([], {
		[Types.RESET_APP]: (state, action) => {
			return appReducer(undefined, action)
			//Passing undefined as state will make all the reducers using their initial states.
		},
		[ReduxSauceTypes.DEFAULT]: (state, action) => {
			return appReducer(state, action)
		}
	})
}

reduxsauce

Some aesthetic toppings for your Redux meal.

MIT
Latest version published 11 months ago

Package Health Score

67 / 100
Full package analysis