Wrap ES6 module around reactive component
I am using react and ES6.
I have a file named:
mainComponent.js
To use this in other files, I just import the component.
Now I want to wrap the component (s) inside an ES6 module so that I just need to use imports in the module to access the component (s)
For example:
If I had 2 components:
reactComponent1.js
reactComponent2.js
Then I want to wrap these 2 components in wrapperModule.js
So, if I want to use these components, I just import wrapperModule.js
Is it possible? If so, how?
+3
source to share
1 answer