Пример #1
0
		case 'REGISTER_TOKEN':
			return {
				...state,
				[ action.name ]: action.settings,
			};
		case 'UNREGISTER_TOKEN':
			return omit( state, action.name );
	}

	return state;
}

export default optimist( combineReducers( {
	editor,
	currentPost,
	isTyping,
	blockSelection,
	provisionalBlockClientId,
	blocksMode,
	blockListSettings,
	isInsertionPointVisible,
	preferences,
	saving,
	notices,
	sharedBlocks,
	template,
	autosave,
	settings,
	tokens,
} ) );
Пример #2
0
import { combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';
import { reducer as notifReducer } from 'redux-notifications';
import optimist from 'redux-optimist';
import reducers from '.';

export default optimist(combineReducers({
  ...reducers,
  notifs: notifReducer,
  routing: routerReducer,
}));
Пример #3
0
					...state,
					[ action.id ]: true,
				};

			case 'SAVE_REUSABLE_BLOCK_SUCCESS':
			case 'SAVE_REUSABLE_BLOCK_FAILURE': {
				const { id } = action;
				return omit( state, id );
			}
		}

		return state;
	},
} );

export default optimist( combineReducers( {
	editor,
	currentPost,
	isTyping,
	blockSelection,
	hoveredBlock,
	blocksMode,
	blockInsertionPoint,
	preferences,
	panel,
	saving,
	notices,
	metaBoxes,
	reusableBlocks,
} ) );