-
- Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues and my issue is unique
- My issue appears in the command-line and not only in the text editor
Description Overview
Error react/prop-types , although the type has been specified
this is error:
import React, { forwardRef, memo } from 'react'; interface Props1 { age: number; } export const Hello = memo( forwardRef(({ age }: Props1) => { // error: 'age' is missing in props validationeslint(react/prop-types) return <div>Hello {age}</div>; }), );
but this is correct:
import React, { forwardRef, memo } from 'react'; interface Props1 { age: number; } const HelloTemp = forwardRef(({ age }: Props1) => { return <div>Hello {age}</div>; }); export const Hello = memo(HelloTemp);
Expected Behavior
Expected no error
eslint-plugin-react version
v7.30.1
eslint version
v8.29.0
node version
v16.19.0
jonsmithers