-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
"remix": minor | ||
"@remix-run/cloudflare": minor | ||
"@remix-run/deno": minor | ||
"@remix-run/node": minor | ||
"@remix-run/react": minor | ||
"@remix-run/serve": minor | ||
"@remix-run/server-runtime": minor | ||
--- | ||
|
||
feat(@remix-run/cloudflare,@remix-run/deno,@remix-run/node): `SerializeFrom` utility for loader and action type inference | ||
|
||
Each runtime package (@remix-run/cloudflare,@remix-run/deno,@remix-run/node) now exports `SerializeFrom`, which is used to | ||
infer the JSON-serialized return type of loaders and actions. | ||
|
||
Example: | ||
```ts | ||
type MyLoaderData = SerializeFrom<typeof loader> | ||
type MyActionData = SerializeFrom<typeof action> | ||
``` | ||
This is what `useLoaderData<typeof loader>` and `useActionData<typeof action>` use under-the-hood. |