Component definition is missing display name when using withAuthenticationRequired

Viewed 77

I have the following compile error

Component definition is missing display name react/display-name

My code:

import React from "react";
import {withAuthenticationRequired} from "@auth0/auth0-react";

function MyComponent () {
    return (<div>Hello</div>);
}

export default withAuthenticationRequired(MyComponent, {
    // Show a message while the user waits to be redirected to the login page.
    onRedirecting: () => <div>Redirecting you to the login page...</div>,
});

I tried solutions from similar questions, but it did not work. Disabling eslint react/display-name option is not what I expect.

1 Answers
Related