Skip to content

Commit

Permalink
add missing changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Jul 13, 2022
1 parent 5d6596c commit 842f2d8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .changeset/giant-grapes-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@remix-run/cloudflare": patch
"@remix-run/deno": patch
"@remix-run/node": patch
"@remix-run/react": patch
"@remix-run/server-runtime": patch
---

We enhanced the type signatures of `loader`/`action` and `useLoaderData`/`useActionData` to make it possible to infer the data type from return type of its related server function.

```tsx
import { LoaderArgs } from "@remix-run/node";

export async function loader(args: LoaderArgs) {
return json({ greeting: "Hello!" }); // TypedResponse<{ greeting: string }>
}

export default function App() {
let data = useLoaderData<typeof loader>(); // { greeting: string }
return <div>{data.greeting}</div>;
}
```

See the discussion in #1254 for more context.
5 changes: 5 additions & 0 deletions .changeset/large-queens-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/cloudflare-workers": patch
---

Prevent building twice with `wrangler publish` (#2079)
5 changes: 5 additions & 0 deletions .changeset/thin-impalas-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Fix broken `--port` flag in `create-remix` (#3694)
2 changes: 1 addition & 1 deletion docs/guides/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Remix compiler will not do any type checking (it simply removes the types).
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"eslint": "^8.11.0",
"typescript": "^4.5.5"
"typescript": "^4.7.4"
},
"engines": {
"node": ">=14"
Expand Down

0 comments on commit 842f2d8

Please sign in to comment.