zodios-react

React hooks for zodios

MIT License

Downloads
33.3K
Stars
60
Committers
5

Bot releases are hidden (Show)

zodios-react - Release 10.2.0

Published by ecyrbe almost 2 years ago

fix typing: should error at compile time when missing parameters

zodios-react - Release 10.0.1

Published by ecyrbe about 2 years ago

fix upgrade to zodios 10.0.1

zodios-react - Release 10.0.0

Published by ecyrbe about 2 years ago

What's new:

  • upgrade to @zodios/core v10
  • migrate to @tanstack/react-query v4
zodios-react - Release 9.4.5

Published by ecyrbe about 2 years ago

Add support for axios 1.x

zodios-react - Release 9.4.3

Published by ecyrbe about 2 years ago

What's fixed:

  • aliases could not be capitalized with hooks
zodios-react - Release 9.4.2

Published by ecyrbe about 2 years ago

What's fixed:

  • react query options for aliases where not inferred
zodios-react - Release 9.4.1

Published by ecyrbe about 2 years ago

What's fixed:

  • Since immutable feature, we lost support for ts 4.5 and zodios was only working on ts >= v4.7
  • we got support back for ts 4.5
zodios-react - Release 9.4

Published by ecyrbe about 2 years ago

What's new:

  • add support for getting the keys outside of hooks:
    • getKeyByAlias
    • getKeyByPath
zodios-react - Release 9.3

Published by ecyrbe about 2 years ago

New hooks:

You don't need to set the immutable flag if you use useImmutableQuery, only if you also want to use your aliased version.
For example without immutable flag, your alias useSearchUser will by default resolve to use useMutation, and when setting it, it will resolve to useImmutableQuery.

There is for the same purpose a useImmutableInfiniteQuery to allow you to do infinite queries.
Note there is no alias for infinite queries.

zodios-react - Release 9.2

Published by ecyrbe about 2 years ago

What's new in this release:

  • internal react-query key is now split between the static part (apiName, Endpoint Path) and the parameters (path params and query params)
  • query hook now also returns the gererated key so that you can use it for fine grained tuning
const { key } = hooks.useQuery('/users');
// you can use the key, it's a tuple of two part key
const [ base, params] = key;
zodios-react - Release 9.1

Published by ecyrbe about 2 years ago

This version add the following new features:

zodios-react - Release 9.0.2

Published by ecyrbe about 2 years ago

What's New in Version 9.0.2 of @zodios/react :

  • fix alias mutation hooks where body was not properly inferred
zodios-react - Release 9.0

Published by ecyrbe about 2 years ago

react libray major version is now aligned with zodios core

zodios-react - Release 3.0.1

Published by ecyrbe over 2 years ago

Add support for zodios 7

zodios-react - Release 2.1

Published by ecyrbe over 2 years ago

This release adds zodios alias support.
If you created an alias name getUser, zodios hooks will allow you to call it with useGetUser.