how to type-safely pass an argument to useQuery from a previous request?
Stack Overflow
how to type-safely pass an argument to useQuery from a previous req...
I have two custom hooks for using useQuery.
The second hook depends on the result of the first
While the first hook is being executed its data is undefined
interface Props {
id: number
enabled:
1 Reply
conscious-sapphire•3y ago
I would merge them in a single useQuery: https://twitter.com/Julien_Delort/status/1628777914291392513
Julien Delort (@Julien_Delort)
@tan_stack query tip: when 2 endpoints are tightly coupled and you always need to call them both to get the data, you don't necessarily need multiple
useQuery calls:
#javascript #webdev #code #webdevelopment #programming #reactjs #react
Twitter