79682867

Date: 2025-06-28 09:08:49
Score: 1
Natty:
Report link

You can keep the second query from firing using a property called enabled as:

const { data: resourceId } = useGetResourceId();
const { data, isLoading, error } = useGetResourceData(resourceId, {
  enabled: !!resourceId // Query won't run until resourceId is truthy
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ashfaque Ahmed