Skip to content

Commit

Permalink
doc: add example
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian committed Nov 15, 2023
1 parent 4cadcec commit f70f249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/react/client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { createQueryClient } from '@http-wizard/react-query';
import axios from 'axios';
import { Router } from 'server';

export const api: A = createQueryClient<Router, ZodTypeProvider>({
export const api = createQueryClient<Router, ZodTypeProvider>({
instance: axios.create(),
}).ref;

type A = ReturnType<typeof createQueryClient<Router, ZodTypeProvider>>['ref'];
});
3 changes: 3 additions & 0 deletions examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "1.0.0",
"license": "MIT",
"private": true,
"scripts": {
"start": "echo 11 && (yarn workspace server dev & yarn workspace client dev)"
},
"workspaces": [
"client",
"server"
Expand Down

0 comments on commit f70f249

Please sign in to comment.