<h1 align="center">react query key helper</h1>
npm install react-query-key-helperQuery key management for @tanstack/query with auto-create features.
For the latest stable version:
``bash`
npm install react-query-key-helper
`js`
createQueryOption
payload: Payload,
pathVariables?: PathVariables
) => QueryKeyHelperReturn
- post method
`js`
createQueryOption({
apiUrl: () => "/todos/search",
queryFn: (apiUrl, payload: TeamSearchRequestT) =>
request.post < PagedTeamsResponseT > (apiUrl, payload),
});
- get method
`js/todo/${id}
createQueryOption
apiUrl: ({ id }) => ,``
queryFn: (apiUrl) => request.get < TeamResponseT > apiUrl,
});