In a react-native project, I would prefer to be able to import all my component like I do with types in my reducers.
I want to be able to write:
import * as Components from '../components'
so I went to my components folder, created an index.js file, imported all the basic components, and exported them like export const ComponentExample1 = ComponentExample1
& export const ComponentExample1 = <ComponentExample/>
. I figured there might be some naming related errors and thats what seems to have happened because I get the error:
Error: TransformErro SyntaxError: ......index.js: Identifier "ComponentExample1" has already been declared
All of my basic components are exported intra-component as export default ComponentExample1
How can I change my approach to effect my end desire?