create-client icon indicating copy to clipboard operation
create-client copied to clipboard

Feat/react query next

Open malikalahfaoui opened this issue 3 years ago • 4 comments

Q A
Branch? main for features / current stable version branch for bug fixes
Tickets #...
License MIT
Doc PR api-platform/docs#...

malikalahfaoui avatar Mar 14 '22 13:03 malikalahfaoui

It probably lacks the usage of:

  • The <QueryClientProvider> component.
  • The <Hydrate> component.

alanpoulain avatar Mar 14 '22 13:03 alanpoulain

Why React Query and not SWR... or just nothing?

dunglas avatar Mar 14 '22 14:03 dunglas

@dunglas IMHO, react-query is the preferred fetcher nowadays (and has more features than SWR). It was your own proposal to use a fetcher: https://github.com/api-platform/client-generator/issues/255, and I think it's a good idea since it has a very good cache system.

alanpoulain avatar Mar 14 '22 15:03 alanpoulain

Let's use react query then 👍

dunglas avatar Mar 14 '22 15:03 dunglas