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 b5558ac commit 557347b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ const axle = createAxle(/** @see https://axios-http.com **/)
const useAxle = createUseAxle({
axle,
// Optional value: Default immediate of the useAxle
immediate: true,
// Optional value: Default immediate of the useAxle, defaults true
immediate: false,
// Optional value: Default onTransform of the useAxle
onTransform: (response) => response,
})
Expand All @@ -308,8 +308,8 @@ const [users, getUsers, { loading, error, uploadProgress, downloadProgress, abor
method: 'get',
// Request url can be a getter function
url: '/user',
// Whether to send the request immediately, defaults false
immediate: true,
// Whether to send the request immediately, defaults true
immediate: false,
// Whether the value needs to be reset before requesting, defaults false
resetValue: true,
// Whether to clone when resetting value, defaults false
Expand Down
8 changes: 4 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ const axle = createAxle(/** @see https://axios-http.com **/)
const useAxle = createUseAxle({
axle,
// 可选项: useAxle 的默认 immediate
immediate: true,
// 可选项: useAxle 的默认 immediate, 默认值: true
immediate: false,
// 可选项: useAxle 的默认 onTransform
onTransform: (response) => response,
})
Expand All @@ -308,8 +308,8 @@ const [users, getUsers, { loading, error, uploadProgress, downloadProgress, abor
method: 'get',
// 请求地址, 可以是 getter 函数
url: '/user',
// 是否立即发送请求, 默认值: false
immediate: true,
// 是否立即发送请求, 默认值: true
immediate: false,
// 请求前是否需要重置 value, 默认值: false
resetValue: true,
// 重置 value 是否对 value 进行拷贝
Expand Down

0 comments on commit 557347b

Please sign in to comment.