Skip to content
Discussion options

You must be logged in to vote

since react-query doesn't actually do any data fetching for you, I'd say it depends on how you are fetching the data? Is it axios, then you can just pass headers to the request:

const useMeQuery = () => useQuery(key, () => axsios.get('/me', { headers }))

if you use something else, please consult the docs of whatever it is you use for data fetching :)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by elisalimli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants