Skip to content

Commit

Permalink
Create neat-beds-unite.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Aug 18, 2022
1 parent fc97ee4 commit bb68c13
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .changeset/neat-beds-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"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
---

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.

0 comments on commit bb68c13

Please sign in to comment.