Skip to content

Commit

Permalink
fix: add ringContext to deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hampuskraft committed Jun 18, 2021
1 parent b7f2323 commit 3f9c9e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/FocusRing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ export default function FocusRing(props: FocusRingComponentProps) {
// If this ring no longer is enabled, hide it.
React.useEffect(() => {
if (!enabled) ringContext.hide();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [enabled]);
}, [enabled, ringContext]);

// If this ring was active, hide it when this component unmounts.
React.useEffect(() => {
Expand Down

0 comments on commit 3f9c9e8

Please sign in to comment.