Skip to content

Commit

Permalink
chore: use useEffect instead of useLayoutEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Sep 20, 2022
1 parent e5fb22a commit 0f70a08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useShowEntryEvent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
useCallback,
useContext,
useLayoutEffect,
useEffect,
useRef
} from 'preact/hooks';

Expand Down Expand Up @@ -35,7 +35,7 @@ export function useShowEntryEvent(id) {
}
}, [ id ]);

useLayoutEffect(() => {
useEffect(() => {
if (focus.current && ref.current) {
if (isFunction(ref.current.focus)) {
ref.current.focus();
Expand Down

0 comments on commit 0f70a08

Please sign in to comment.