You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constprofileState=useSelector(({ profile }:
{profile: ProfileState})=>// 'profile' PropType is defined but prop is never used eslint(react/no-unused-prop-types)profile,);
example2:
consthandleVerifySubmit=({
otp,}: {otp: string,// 'otp' PropType is defined but prop is never used eslint(react/no-unused-prop-types)})=>{dispatch(verifyOTPPhone({
otp,}),);};
I get false positives when defining the type of a destructured prop. Would greatly appreciate any help!
The text was updated successfully, but these errors were encountered:
Winggo
changed the title
react/no-unused-prop-types false positive when defining types with TypeScriptreact/no-unused-prop-types false positive when defining type of destructured props [TS]
Jun 30, 2020
example1:
example2:
I get false positives when defining the type of a destructured prop. Would greatly appreciate any help!
eslint@6.8.0
eslint-plugin-react@7.19.0
typescript@3.7.2
The text was updated successfully, but these errors were encountered: