File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,18 @@ export interface FetchProps<TData = any> {
3838 fetchFunction ?: ( url : string , options : RequestInit ) => Promise < any > ;
3939 onDataChange ?: ( newData : TData , data : TData ) => any ;
4040 onChange ?: ( result : FetchResult < TData > ) => void ;
41- children : ( result : FetchResult < TData > ) => React . ReactNode | React . ReactNode ;
4241}
4342
4443export function useFetch < TData = any > (
4544 props : FetchProps < TData >
4645) : FetchResult < TData > ;
4746
4847export default class Fetch < TData = any > extends React . Component <
49- FetchProps < TData >
48+ FetchProps < TData > & {
49+ children ?: (
50+ result : FetchResult < TData >
51+ ) => React . ReactNode | React . ReactNode ;
52+ }
5053> {
5154 // Passing any to FetchResult as unable to use TData
5255 static Consumer : React . Consumer < FetchResult < any > > ;
You can’t perform that action at this time.
0 commit comments