我无法理解这段代码。我如何传递 id 和数据?
function usePutCompany(id) {
const [putCompany] = useMutation<any, any, any>(
(data) => ApiCall.Company.put(id, data),
{
onSuccess() {
queryCache.invalidateQueries('company')
queryCache.refetchQueries('company')
},
throwOnError: true,
},
)
return putCompany
}