I have a react.js file MyComponent that has this at the end:
module.exports = MyComponent
, where MyComponent
is a function defined in the file.
What if I want to export ANOTHER function: MyHelperComponent
from the same file, so that another react component from another react.js file may use MyHelperComponent
directly ?
So my question is: how do I export a function that is not the 'main' component of the module ?