Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Sep 24, 2024
1 parent 557347b commit 5806736
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ export interface UpdateUser {
```ts
const route = useRoute()

const [users, getUsers] = apiGetUsers.use(/** same as useAxle and extends pathParams **/)
const [users, getUsers] = apiGetUsers.use<Response<User[]>>(/** same as useAxle and extends pathParams **/)

const [user, getUser] = apiGetUser.use<User>({
const [user, getUser] = apiGetUser.use<Response<User>>({
pathParams: () => ({ id: route.params.id }),
})

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ export interface UpdateUser {
```ts
const route = useRoute()

const [users, getUsers] = apiGetUsers.use(/** 和 useAxle 一致并且扩展了 pathParams **/)
const [users, getUsers] = apiGetUsers.use<Response<User[]>>(/** 和 useAxle 一致并且扩展了 pathParams **/)

const [user, getUser] = apiGetUser.use<User>({
const [user, getUser] = apiGetUser.use<Response<User>>({
pathParams: () => ({ id: route.params.id }),
})

Expand Down

0 comments on commit 5806736

Please sign in to comment.