1

I have a react redux project. and in my project the structure is:

--Feature
---reducer.js
---selectors.js
---index.js

So selector.js for example:

export const featureSelectorA = () => ({

})

export const featureSelectorB = () => ({

})

and then I want to export all from index.js, like this:

import * as FeatureSelector from './FeatureSelector'
export { FeatureSelector }

Question:

What I'm asking, Is there es6 feature to reduce the code above to something like this?

export * as FeatureSelector from './FeatureSelector'
Jack Bashford
  • 43,180
  • 11
  • 50
  • 79
CommCo
  • 47
  • 5

1 Answers1

0

Yes - use the syntax described in the proposal here:

export * as FeatureSelector from "./FeatureSelector";
Jack Bashford
  • 43,180
  • 11
  • 50
  • 79