Skip to content

Commit 902c3e4

Browse files
fix: resolve React 19 TypeScript compatibility in modernjs package
- Fix useRef() call to provide initial value for React 19 compatibility - Resolves 'Expected 1 arguments, but got 0' TypeScript error - Ensures all 35 packages build successfully 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3befe9f commit 902c3e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/modernjs/src/runtime/AwaitDataFetch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function AwaitDataFetch<T>({
8383
children,
8484
params,
8585
}: AwaitProps<T>) {
86-
const dataRef = useRef<T>();
86+
const dataRef = useRef<T | undefined>(undefined);
8787
const data = dataRef.current || resolve;
8888
const getData = isPromise(data) ? fetchData(data, dataRef) : () => data;
8989

0 commit comments

Comments
 (0)