I want to import multiple things in js, I have tried with import *
like this:
the export file AppEpics.js:
export fooEpic = Observable.of() // some fancy code;
export barEpic = Observable.of() // some other fancy code;
the import file:
import * as App from './AppEpics'
export default combineEpics(...App)
I found that while I log the App
, I get a object that contains the foo and bar, but when I log the ...App
, I get nothing.
I am using babel preset env and react for now. How do I solve that?
BTW, the combineEpics only accepts the epics like fooEpics
, so that I cannot call this function like this:
import * as App from './AppEpics'
export default combineEpics(App) // that will not work.