function registerStores(reactorState, stores) {
	  return reactorState.withMutations(function (reactorState) {
	    (0, _utils.each)(stores, function (store, id) {
	      if (reactorState.getIn(['stores', id])) {
	        /* eslint-disable no-console */
	        console.warn('Store already defined for id = ' + id);
	        /* eslint-enable no-console */
	      }

	      var initialState = store.getInitialState();

	      if (initialState === undefined && getOption(reactorState, 'throwOnUndefinedStoreReturnValue')) {
	        throw new Error('Store getInitialState() must return a value, did you forget a return statement');
	      }
	      if (getOption(reactorState, 'throwOnNonImmutableStore') && !(0, _immutableHelpers.isImmutableValue)(initialState)) {
	        throw new Error('Store getInitialState() must return an immutable value, did you forget to call toImmutable');
	      }

	      reactorState.update('stores', function (stores) {
	        return stores.set(id, store);
	      }).update('state', function (state) {
	        return state.set(id, initialState);
	      }).update('dirtyStores', function (state) {
	        return state.add(id);
	      }).update('storeStates', function (storeStates) {
	        return incrementStoreStates(storeStates, [id]);
	      });
	    });
	    incrementId(reactorState);
	  });
	}
@param {ReactorState} reactorState
@param {Object<String, Store>} stores
@return {ReactorState}