-
Notifications
You must be signed in to change notification settings - Fork 4.7k
ESLint: Bump eslint-plugin-react-compiler to latest beta
#69945
New issue
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
Conversation
|
Size Change: -50 B (0%) Total Size: 1.85 MB
ℹ️ View Unchanged
|
| const isMountingRef = useRef( true ); | ||
| const wrapperNode = useRef(); | ||
| const textInputRef = useRef(); | ||
| const isEndingEditWithFocusRef = useRef( false ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ref was originally used as part of a conditional statement to prevent focus loss: d66d53b?diff=unified#diff-278587d24f4060dd3b05ef00adba5f9afdda8fe5b52a8587005b5012a9fc8df0R115
However, since the conditional statement itself has been removed, this ref is no longer used anywhere: https://github.com/WordPress/gutenberg/pull/32552/files#diff-278587d24f4060dd3b05ef00adba5f9afdda8fe5b52a8587005b5012a9fc8df0L158-L167
| // When unmounting the component if there are empty elements (the user did not complete the insertion) clean them. | ||
| const elementsReferenceRef = useRef< typeof elements >(); | ||
| useEffect( () => { | ||
| elementsReferenceRef.current = elements; | ||
| }, [ elements ] ); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ref was originally used as part of a conditional statement: https://github.com/WordPress/gutenberg/pull/36820/files#diff-3749f548d9b617ffd46aadb474aae082c8e26ce9bab26599e892f2fd9f2f1b35R160
However, since the conditional statement itself has been removed, this ref is no longer used anywhere.
eslint-plugin-react-compiler to latest beta
f06cfb7 to
a3976de
Compare
a3976de to
a26a635
Compare
|
|
||
| export function useEventListeners( props ) { | ||
| const propsRef = useRef( props ); | ||
| const [ state, setState ] = useState( props ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the warning here? This latest prop pattern should still be supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
The |
|
Do we close this PR and try |
IMO, that might be easier. Let's start by just migration, and we can discuss failures one by one and how to handle them. |

Related PRs:
eslint-plugin-react-compiler#61788eslint-plugin-react-compilerto latest beta #67106What?
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast