0

I import this component

import { someComponent } from './someComponent';

Then I declare a new component, that will be the child for the invoked one

const anotherComponent = () => {...};

I'm exporting it this way

export { someComponent(anotherComponent) };

but I'm receiving the following (not very helpful) error Parsing error: ',' expected.

leireriel
  • 1
  • 1

1 Answers1

0

It seems that the good way to do it was

export const newVariable = someComponent(anotherComponent);

And I think the best option is naming the file like the exported variable ;)

leireriel
  • 1
  • 1