DEV Community

SAI PRAKASH
SAI PRAKASH

Posted on

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

Help me with this error Please....

Discussion (1)

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