File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -118,14 +118,20 @@ export function useQueries<T extends any[]>(
118118
119119 const queryClient = useQueryClient ( )
120120
121- const defaultedQueries = useMemo ( ( ) => queries . map ( options => {
122- const defaultedOptions = queryClient . defaultQueryObserverOptions ( options )
123-
124- // Make sure the results are already in fetching state before subscribing or updating options
125- defaultedOptions . optimisticResults = true
126-
127- return defaultedOptions
128- } ) , [ queries , queryClient ] ) ;
121+ const defaultedQueries = useMemo (
122+ ( ) =>
123+ queries . map ( options => {
124+ const defaultedOptions = queryClient . defaultQueryObserverOptions (
125+ options
126+ )
127+
128+ // Make sure the results are already in fetching state before subscribing or updating options
129+ defaultedOptions . optimisticResults = true
130+
131+ return defaultedOptions
132+ } ) ,
133+ [ queries , queryClient ]
134+ )
129135
130136 const [ observer ] = React . useState (
131137 ( ) => new QueriesObserver ( queryClient , defaultedQueries )
You can’t perform that action at this time.
0 commit comments