client/state/utils.js
function setupReducerPersistence( reducer ) {
	if ( reducer.hasCustomPersistence ) {
		return reducer;
	}

	if ( reducer.schema ) {
		return withSchemaValidation( reducer.schema, reducer );
	}

	return withoutPersistence( reducer );
}
function setupReducerPersistence( reducer ) {
	if ( reducer.hasCustomPersistence ) {
		return reducer;
	}

	if ( reducer.schema ) {
		return withSchemaValidation( reducer.schema, reducer );
	}

	return withoutPersistence( reducer );
}
/*
Wrap the reducer with appropriate persistence code. If it has the `hasCustomPersistence` flag,
it means it's already set up and we don't need to make any changes.
If the reducer has a `schema` property, it means that persistence is requested and we
wrap it with code that validates the schema when loading persisted state.