_conditional_dependencies
Conditional Dependencies
Use null
as the second argument to any Data Client hook means "do nothing."
// todo could be undefined if id is undefined
const todo = useSuspense(TodoResource.get, id ? { id } : null);
Use null
as the second argument to any Data Client hook means "do nothing."
// todo could be undefined if id is undefined
const todo = useSuspense(TodoResource.get, id ? { id } : null);