You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -59,7 +61,9 @@ export default new Proxy(baseClient, {
59
61
returnnewClient[key];
60
62
},
61
63
});
64
+
```
62
65
66
+
```ts
63
67
// src/some-other-file.ts
64
68
importclientfrom"./lib/api";
65
69
@@ -80,7 +84,7 @@ openapi-fetch is simple vanilla JS that can be used in any project. But sometime
80
84
81
85
### Next.js
82
86
83
-
<ahref="https://nextjs.org/"target="_blank"rel="noopener noreferrer">Next.js</a> is the most popular SSR framework for React. While [React Query](#react--react-query) is recommended for clientside fetching, this example shows how to take advantage of <ahref="https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-fetch"target="_blank"rel="noopener noreferrer">server-side fetching</a>.
87
+
<ahref="https://nextjs.org/"target="_blank"rel="noopener noreferrer">Next.js</a> is the most popular SSR framework for React. While [React Query](#react--react-query) is recommended for all clientside fetching with openapi-fetch (not SWR), this example shows how to take advantage of Next.js’s <ahref="https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-fetch"target="_blank"rel="noopener noreferrer">server-side fetching</a> with built-in caching.
84
88
85
89
[View a code example in GitHub](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/nextjs)
0 commit comments