We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The rule react/destructuring-assignment won't apply on component passed in forwardRef.
import { forwardRef } from "react"; interface Props { day: string; } // Code to expect error but works just fine export const MyComponent = forwardRef<HTMLDivElement, Props>( function MyComponent(props, ref) { return <div ref={ref}>{props.day}</div>; } ); // Correct code export const MyComponent = forwardRef<HTMLDivElement, Props>( function MyComponent({ day }, ref) { return <div ref={ref}>{day}</div>; } );
v7.33.2
v8.48.0
v18.15.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an existing issue for this?
Description Overview
The rule react/destructuring-assignment won't apply on component passed in forwardRef.
Expected Behavior
eslint-plugin-react version
v7.33.2
eslint version
v8.48.0
node version
v18.15.0
The text was updated successfully, but these errors were encountered: