Skip to content

Commit 6009c2b

Browse files
committed
revert quotes switch
1 parent c6d4b89 commit 6009c2b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/openapi-react-query/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,27 @@ npx openapi-typescript ./path/to/api/v1.yaml -o ./src/lib/api/v1.d.ts
3232
Once your types have been generated from your schema, you can create a [fetch client](../openapi-fetch), a react-query client and start querying your API.
3333

3434
```tsx
35-
import createFetchClient from 'openapi-fetch';
36-
import createClient from 'openapi-react-query';
37-
import type { paths } from './my-openapi-3-schema'; // generated by openapi-typescript
35+
import createFetchClient from "openapi-fetch";
36+
import createClient from "openapi-react-query";
37+
import type { paths } from "./my-openapi-3-schema"; // generated by openapi-typescript
3838

3939
const fetchClient = createFetchClient<paths>({
40-
baseUrl: 'https://myapi.dev/v1/',
40+
baseUrl: "https://myapi.dev/v1/",
4141
});
4242
const $api = createClient(fetchClient);
4343

4444
const MyComponent = () => {
4545
const { data, error, isPending } = $api.useQuery(
46-
'get',
47-
'/blogposts/{post_id}',
46+
"get",
47+
"/blogposts/{post_id}",
4848
{
4949
params: {
5050
path: { post_id: 5 },
5151
},
5252
}
5353
);
5454

55-
if (isPending || !data) return 'Loading...';
55+
if (isPending || !data) return "Loading...";
5656

5757
if (error) return `An error occurred: ${error.message}`;
5858

0 commit comments

Comments
 (0)