Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible using variable when create query key? #94

Open
h0ngwon opened this issue Jul 5, 2024 · 1 comment
Open

Is it possible using variable when create query key? #94

h0ngwon opened this issue Jul 5, 2024 · 1 comment

Comments

@h0ngwon
Copy link

h0ngwon commented Jul 5, 2024

I'm wondering using variable is possible.
here is my current query key for example

function test(a: string, b: string) {
  return useQuery({
    queryKey: ["key_one", a, "key_two", b],
    queryFn: () => testFunction(a, b),
  });
}

In this situation how can I make queryKey like in above queryKey?

Copy link

linear bot commented Jul 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant