Skip to content

Commit

Permalink
Single Fetch: Add undefined to the useRouteLoaderData type override (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 authored Jul 29, 2024
1 parent ef612a7 commit 5fb59cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/silver-laws-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Single Fetch: Add `undefined` to the `useRouteLoaderData` type override
2 changes: 1 addition & 1 deletion packages/remix-react/future/single-fetch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ declare module "@remix-run/react" {

export function useRouteLoaderData<T extends Loader>(
routeId: string
): Serialize<T>;
): Serialize<T> | undefined;

export function useFetcher<T extends Loader | Action>(
opts?: Parameters<typeof useFetcherRR>[0]
Expand Down

0 comments on commit 5fb59cc

Please sign in to comment.