DEV Community

loading...

Assign arrow function to a variable before exporting as module default import/no-anonymous-default-export

saiprakashr42 profile image SAI PRAKASH ・1 min read

Help me with this error Please....

Discussion (1)

pic
Editor guide
Collapse
tmenyhart profile image
Tamas Menyhart

I think the solution would be:

Unstead of:

export default () => { ... };
Enter fullscreen mode Exit fullscreen mode

Use like this:

const fn = () => { ... };
export default fn;
Enter fullscreen mode Exit fullscreen mode