zodios-react icon indicating copy to clipboard operation
zodios-react copied to clipboard

Support tanstack query v5

Open andi0b opened this issue 1 year ago • 8 comments

See this guide: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5

andi0b avatar Oct 19 '23 11:10 andi0b

I'm taking a look at this

ThibautMarechal avatar Oct 30 '23 12:10 ThibautMarechal

v5 also has suspense queries which remove a lot of boilerplate dealing with pending and error states (https://tanstack.com/query/v5/docs/react/reference/useSuspenseQuery). It would be good to support them in zodios, possibly with another boolean flag (suspense: true).

nhaustov avatar Nov 15 '23 08:11 nhaustov

@nhaustov Adding a boolean to control if it will suspense or not, will goes against the rules of hooks.

I can try to work on it @ecyrbe ? It may require some refactoring since lot of the code would be duplicated with the useSuspenceQuery, useQuery, useImmutableSuspenseQuery, useImmutableSuspenseQuery.

Should I make it in the same pull-request ?

ThibautMarechal avatar Nov 20 '23 09:11 ThibautMarechal

I think it would be great to just get out a release with tanstack query v5 and no support of suspense query. and add the suspense feature in a later pull request.

Edit: this would allow current users to just upgrade to query v5. Additional features can be added in a later step.

andi0b avatar Nov 20 '23 13:11 andi0b

Hi, The merge of the PR #464 is planned ?

ArFnds avatar Dec 13 '23 10:12 ArFnds

Looks like the project is dead. I think it should be removed as a suggestion from the Zodios docs.

andi0b avatar Dec 13 '23 13:12 andi0b

@ecyrbe was busy on another project and is expected to get back early 2024 (readed from twitter)

ThibautMarechal avatar Dec 13 '23 20:12 ThibautMarechal

It's time to move from a single person project to many people. I hope @ecyrbe sees this.

ismail-codar avatar Dec 14 '23 06:12 ismail-codar