Skip to content

Commit

Permalink
Deprecate SerializeFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Oct 29, 2024
1 parent 917a389 commit f222092
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-zebras-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/server-runtime": minor
---

Deprecate `SerializeFrom` in favor of generics because it will be removed in React Router v7
5 changes: 5 additions & 0 deletions packages/remix-server-runtime/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ type SingleFetchEnabled =
*
* For example:
* `type LoaderData = SerializeFrom<typeof loader>`
*
* @deprecated SerializeFrom is deprecated and will be removed in React Router
* v7. Please use the generics on `useLoaderData`/etc. instead of manually
* deserializing in Remix v2. You can convert to the generated types once you
* migrate to React Router v7.
*/
export type SerializeFrom<T> =
SingleFetchEnabled extends true ? SingleFetch_SerializeFrom<T> :
Expand Down

0 comments on commit f222092

Please sign in to comment.