我有以下编译错误
<块引用>组件定义缺少显示名称 react/display-name
我的代码:
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>,
});
我尝试了类似问题的解决方案,但没有奏效。禁用 eslint react/display-name 选项不是我所期望的。