Commit graph

8 commits

Author SHA1 Message Date
f4bfa34466 chore: add example for request cancelation 2020-12-23 05:16:09 +03:00
651e09bc31 feat: extract types from endpoint
chore: change example and readme

Closes #24
2020-12-19 13:26:22 +03:00
49aac94675 fix: use window location as base url
chore: add dist folder to repo
chore(deps): add node-fetch for tests
chore: change prepare request visibility
chore: add tests for prepare request method
chore: update example

Closes #20
2020-12-08 10:35:18 +03:00
c848b0c785 feat!: transform endpoint data before state
BREAKING CHANGES: Endpoint now required response, variables and
params types

Closes #3
2020-11-20 20:01:24 +03:00
a1574769e9 feat(request-hook): add on failure callback
* fix(client): remove destruction from response
* chore: update example

Add single endpoint, add router, add pages

Closes #9
2020-11-06 00:58:43 +03:00
8c6833805b feat!(request-hook): add new request hook
This hook works only for endpoint with GET method.

* refac!(request-hook): add lazy prefix to request hook

BREAKING CHANGES: you need to rename all `useRequest` hooks to
`useLazyRequest`

* refac!(request-hook): add public request state

BREAKING CHANGES: User shouldn't see previous headers, variables and params.
It's only for hooks so it doesn't call request again. If you use these
state you should to remove it from your code.

* chore: update example

Closes #5
2020-11-05 23:26:56 +03:00
243f4f77e5 feat!(client): add client fetch based
breaking!(context): client prop instead base url
refac: change axios response to client response
chore(deps): remove axios
chore: update example

Closes #2
2020-11-05 00:23:57 +03:00
c20198f14f chore: add movies example 2020-11-04 21:23:29 +03:00