@x011/request
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

@x011/request

Use SWR in the way of useRequest hook

Examples

Change Logs

  • [0.0.8] Bugfix If refresh data is not object {...data} will transform to object data once
  • [0.0.7] Bugfix & run function add new params reload, provider force send request with same params and trigger loading
  • [0.0.4] Optimize the position of the request promise function parameter to the first place, add the use of example code
  • [0.0.2] Add params SWR response and initialData parameter = swr.fallbackData, mutate => swrMutate, mutate will update the local data immediately, but disable the revalidation
  • [0.0.1] Add default parameters, manually execute functions, and refresh interfaces that match useRequest, etc.

Package Sidebar

Install

npm i @x011/request

Weekly Downloads

10

Version

0.0.8

License

MIT

Unpacked Size

27.1 kB

Total Files

11

Last publish

Collaborators

  • linyupark