ESLint/eslint-plugin-react:修订间差异
来自康健生活
| 第1行: | 第1行: | ||
== 标题文字 == | == 标题文字 == | ||
== error == | == error == | ||
* <syntaxhighlight lang="javascript"> | * <syntaxhighlight lang="javascript" inline> | ||
function React.forwardRef<any, {}>(render: React.ForwardRefRenderFunction<any, {}>): React.ForwardRefExoticComponent<React.RefAttributes<any>></syntaxhighlight> | function React.forwardRef<any, {}>(render: React.ForwardRefRenderFunction<any, {}>): React.ForwardRefExoticComponent<React.RefAttributes<any>></syntaxhighlight> Component definition is missing display nameeslintreact/display-name | ||
Component definition is missing display nameeslintreact/display-name | |||
: <syntaxhighlight lang="javascript"> | : <syntaxhighlight lang="javascript"> | ||
const Test = React.forwardRef(function Input(props, ref) { return <input {...props} />});</syntaxhighlight> | const Test = React.forwardRef(function Input(props, ref) { return <input {...props} />});</syntaxhighlight> | ||