Skip to content
Discussion options

You must be logged in to vote

This actually worked! I'll post my solution here in case anybody needs it.

import { useQuery, UseQueryOptions, QueryKey } from "react-query";

/**
 *
 * @param {object} param -
 * @param {QueryKey} param.key = Unique Query Key for your query similar to react-query
 * @param {string} param.url - Url for your query
 * @param {string} param.id- Second value - Pass any ID to your query
 * @param {UseQueryOptions} param.config - Config for query similar to react-query options object
 */
 export default useQueryHook() {
 ...
 }

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rohitpotato
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants