Skip to content

Releases: alovajs/alova

@alova/[email protected]

23 Oct 15:24
fafab56
Compare
Choose a tag to compare

Patch Changes

@alova/[email protected]

23 Oct 15:24
fafab56
Compare
Choose a tag to compare

Patch Changes

[email protected]

12 Oct 06:25
53de6fb
Compare
Choose a tag to compare

Minor Changes

const { send } = useRequest((a: number, b: string) => alova.Get('/'));
send(1, 'a'); // send type is `function send(a: number, b: string, ...args: any[])`
  • #563 ea20f56 the function refresh and reload return by usePagination will return a promise
const { reload, refresh } = usePagination(alova.Get('/user/list'), {
  // ...
});

const handleReload = async () => {
  await reload(); // resolve at reloading success, reject at reloading fail.
};

const handleRefresh = async () => {
  await refresh(); // resolve at refreshing success, reject at refreshing fail.
};

Patch Changes

  • #563 ea20f56 loading value depends on immdediate event if middleware is set

  • #563 ea20f56 optimize the type Method to extend Promise

const getter = alova.Get<{ code: number, data: any, msg: string }>('/');
type Result = Awaited<typeof getter>; // type `Result` is `{ code: number, data: any, msg: string }`

@alova/[email protected]

12 Oct 06:25
53de6fb
Compare
Choose a tag to compare

Patch Changes

@alova/[email protected]

12 Oct 06:25
53de6fb
Compare
Choose a tag to compare

Patch Changes

@alova/[email protected]

12 Oct 06:25
53de6fb
Compare
Choose a tag to compare

Patch Changes

@alova/[email protected]

12 Oct 06:25
53de6fb
Compare
Choose a tag to compare

Patch Changes

@alova/[email protected]

12 Oct 06:24
53de6fb
Compare
Choose a tag to compare

Patch Changes

@alova/[email protected]

12 Oct 06:24
53de6fb
Compare
Choose a tag to compare

Patch Changes

@alova/[email protected]

12 Oct 06:24
53de6fb
Compare
Choose a tag to compare

Patch Changes