Skip to content

Commit 007f92e

Browse files
Flewphannojg
authored andcommitted
React 19 type fixes
1 parent fd060a3 commit 007f92e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/bottomSheetModal/BottomSheetModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,10 @@ const BottomSheetModal = memo(forwardRef(BottomSheetModalComponent)) as <
478478
props: BottomSheetModalProps<T> & {
479479
ref?: React.ForwardedRef<BottomSheetModal<T>>;
480480
}
481-
) => ReturnType<typeof BottomSheetModalComponent>;
481+
) => ReturnType<typeof BottomSheetModalComponent<any>>;
482482
(
483483
BottomSheetModal as React.MemoExoticComponent<
484-
typeof BottomSheetModalComponent
484+
(props: BottomSheetModalProps<any>) => React.JSX.Element
485485
>
486486
).displayName = 'BottomSheetModal';
487487

src/hooks/useStableCallback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Callback<T extends unknown[], R> = (...args: T) => R;
88
export function useStableCallback<T extends unknown[], R>(
99
callback: Callback<T, R>
1010
) {
11-
const callbackRef = useRef<Callback<T, R>>();
11+
const callbackRef = useRef<Callback<T, R> | undefined>(undefined);
1212

1313
useLayoutEffect(() => {
1414
callbackRef.current = callback;

0 commit comments

Comments
 (0)