diff --git a/README.md b/README.md index 06f1709..16bfbd6 100644 --- a/README.md +++ b/README.md @@ -470,16 +470,16 @@ const [user, getUser] = apiGetUser.use>({ pathParams: () => ({ id: route.params.id }), }) -async function handleCreate(payload: CreateUser) { - const { success } = await apiCreateUser.load(payload) +async function handleCreate(params: CreateUser) { + const { success } = await apiCreateUser.load(params) if (success) { getUsers() } } -async function handleUpdate(payload: UpdateUser, id: string) { - const { success } = await apiUpdateUser.load(payload, { id }) +async function handleUpdate(params: UpdateUser, id: string) { + const { success } = await apiUpdateUser.load(params, { id }) if (success) { getUsers() diff --git a/README.zh-CN.md b/README.zh-CN.md index f037331..7fe9bc7 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -470,16 +470,16 @@ const [user, getUser] = apiGetUser.use>({ pathParams: () => ({ id: route.params.id }), }) -async function handleCreate(payload: CreateUser) { - const { success } = await apiCreateUser.load(payload) +async function handleCreate(params: CreateUser) { + const { success } = await apiCreateUser.load(params) if (success) { getUsers() } } -async function handleUpdate(payload: UpdateUser, id: string) { - const { success } = await apiUpdateUser.load(payload, { id }) +async function handleUpdate(params: UpdateUser, id: string) { + const { success } = await apiUpdateUser.load(params, { id }) if (success) { getUsers()