forwardRef example has error in TypeScript

1
closed
valtism
valtism
Posted 5 months ago

forwardRef example has error in TypeScript #433

    "@types/react": "^17.0.11",
    "@types/react-dom": "^17.0.8",
    "@typescript-eslint/eslint-plugin": "^4.28.0",
    "@typescript-eslint/parser": "^4.28.0",

The code from https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/ on forwardRef has the error 'children' is missing in props validation based on the react/propTypes ESLint rule https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md

This rule says it validates on prop-types typing, as well as TS types. I am not sure if this is an issue in ESLint or TypeScript

eps1lon
eps1lon
Created 5 months ago

Thanks for the feedback. This sounds like a bug in eslint-plugin-react. Please report this issue on their repository