Skip to content

Commit

Permalink
Create witty-kiwis-flow.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori authored Oct 21, 2022
1 parent 39e28bf commit 21c74e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/witty-kiwis-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"remix": patch
"@remix-run/react": patch
---

Infer the type of the `.data` property of `useFetcher` from `loader` and `action` functions.
Similarly to how you can write useLoaderData<typeof loader>. e.g. you can now write useFetcher<typeof action>, and fetcher.data will be inferred correctly.
Previously, you had to write useFetcher<SerializeFrom<typeof action>>.

0 comments on commit 21c74e5

Please sign in to comment.