In a file called index.js i have the following export:
export default {
foo: true,
bar: false
}
Later in file home.js i'm doing the following:
import { foo, bar } from './index'
console.log(foo, bar) -> undefined, undefined
If i import everything like:
import index from './index'
console.log(index) -> { foo: true, bar: false }
Can someone explain me why this is happening? I'm doing something wrong?
I'm using:
› create-react-app -V 1.0.3