1.1.1 • Published 11 months ago

react-query-key-helper v1.1.1

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

Installing

For the latest stable version:

npm install react-query-key-helper

Usage

createQueryOption<Payload, PathVariables, Response> => ((
  payload: Payload,
  pathVariables?: PathVariables
) => QueryKeyHelperReturn<Response>
  • post method
createQueryOption({
  apiUrl: () => "/todos/search",
  queryFn: (apiUrl, payload: TeamSearchRequestT) =>
    request.post < PagedTeamsResponseT > (apiUrl, payload),
});
  • get method
createQueryOption<undefined, { id: string }>({
  apiUrl: ({ id }) => `/todo/${id}`,
  queryFn: (apiUrl) => request.get < TeamResponseT > apiUrl,
});
1.1.1

11 months ago

1.1.0

11 months ago

1.0.7

11 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.1

1 year ago