将“导出默认值”更改为命名导出

时间:2016-12-13 16:43:58

标签: javascript ecmascript-6 export

我有以下导出:

import { compose } from '@ngrx/core/compose';

export default compose(storeLogger(), combineReducers)({
  events: fromEvents.eventsReducer,
  subscriptions: fromSubscriptions.subscriptionsReducer
});

我想导出为命名函数,而不是默认值。我怎么能这样做?

1 个答案:

答案 0 :(得分:2)

试试这个:

import { compose } from '@ngrx/core/compose';

export const name = compose(storeLogger(), combineReducers)({
  events: fromEvents.eventsReducer,
  subscriptions: fromSubscriptions.subscriptionsReducer
});