-
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
17 changed files
with
423 additions
and
256 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,40 @@ | ||
--- | ||
"@remix-run/cloudflare": patch | ||
"@remix-run/deno": patch | ||
"@remix-run/node": patch | ||
"@remix-run/react": patch | ||
"@remix-run/server-runtime": patch | ||
--- | ||
|
||
(unstable) Improved typesafety for single-fetch | ||
|
||
If you were already using single-fetch types: | ||
|
||
- Remove `"@remix-run/react/future/single-fetch.d.ts"` override from `tsconfig.json` > `compilerOptions` > `types` | ||
- Remove `defineLoader`, `defineAction`, `defineClientLoader`, `defineClientAction` helpers from your route modules | ||
- Replace `UIMatch_SingleFetch` type helper with `UIMatch` | ||
- Replace `MetaArgs_SingleFetch` type helper with `MetaArgs` | ||
|
||
Then you are ready for the new typesafety setup: | ||
|
||
```ts | ||
// vite.config.ts | ||
|
||
declare module "@remix-run/server-runtime" { | ||
interface Future { | ||
unstable_singleFetch: true // 👈 enable _types_ for single-fetch | ||
} | ||
} | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
remix({ | ||
future: { | ||
unstable_singleFetch: true // 👈 enable single-fetch | ||
} | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
For more information, see [Guides > Single Fetch](https://remix.run/docs/en/dev/guides/single-fetch) in our docs. |
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
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
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
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
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
Oops, something went wrong.