mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-20 16:00:38 +02:00
chore: upgrade to react@19 (#9182)
This commit is contained in:
@@ -2,7 +2,7 @@ import { useEffect } from "react";
|
||||
import { EVENT } from "../constants";
|
||||
|
||||
export function useOutsideClick<T extends HTMLElement>(
|
||||
ref: React.RefObject<T>,
|
||||
ref: React.RefObject<T | null>,
|
||||
/** if performance is of concern, memoize the callback */
|
||||
callback: (event: Event) => void,
|
||||
/**
|
||||
|
@@ -5,7 +5,7 @@ import throttle from "lodash.throttle";
|
||||
const scrollPositionAtom = atom<number>(0);
|
||||
|
||||
export const useScrollPosition = <T extends HTMLElement>(
|
||||
elementRef: React.RefObject<T>,
|
||||
elementRef: React.RefObject<T | null>,
|
||||
) => {
|
||||
const [scrollPosition, setScrollPosition] = useAtom(scrollPositionAtom);
|
||||
|
||||
|
Reference in New Issue
Block a user