const { data, error, ...rest } = useSWR(
id ? `/api/v1/blogs/${id}` : null,
fetcher
);
如何指定类型...rest
?
const {data,error,...rest} : {data:any,error:Error,"I dont know what to place for ...rest"}
const { data, error, ...rest } = useSWR(
id ? `/api/v1/blogs/${id}` : null,
fetcher
);
如何指定类型...rest
?
const {data,error,...rest} : {data:any,error:Error,"I dont know what to place for ...rest"}