Skip to content
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

NavigatorScreen: add missing deps to useEffect dep array #43910

Closed

Conversation

flootr
Copy link
Contributor

@flootr flootr commented Sep 6, 2022

What?

Updates the NavigatorScreen component to satisfy the exhaustive-deps eslint rule

Why?

Part of the effort in #41166 to apply exhaustive-deps to the Components package

How?

Add the location.isBack & previousLocation?.focusTargetSelector to the useEffect dependency array.

Testing Instructions

  1. From your local Gutenberg directory, run npx eslint --rule 'react-hooks/exhaustive-deps: warn' packages/components/src/navigator/navigator-screen
  2. Confirm that the linter returns no errors
  3. Confirm unit tests still pass
  4. Run Storybook locally, confirm the components stories and/or docs still work as expected
@flootr flootr changed the title NavigatorScreen: add missing deps to useEffect dep array Sep 6, 2022
@flootr
Copy link
Contributor Author

flootr commented Sep 6, 2022

Oops, I missed there's already #43876.

@flootr flootr closed this Sep 6, 2022
@flootr flootr deleted the enhance/NavigatorScreen-exhaustive-deps branch September 6, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant