File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/plugins/es_ui_shared/public/request Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- import { useEffect , useState , useRef , useMemo } from 'react' ;
20+ import { useEffect , useState , useRef } from 'react' ;
2121
2222import { HttpSetup } from '../../../../../src/core/public' ;
2323import { sendRequest , SendRequestConfig , SendRequestResponse } from './send_request' ;
@@ -115,15 +115,13 @@ export const useRequest = <D = any, E = Error>(
115115 return { data : serializedResponseData , error : responseError } ;
116116 } ;
117117
118- const stringifiedQuery = useMemo ( ( ) => JSON . stringify ( query ) , [ query ] ) ;
119-
120118 useEffect ( ( ) => {
121119 sendRequestRef . current ! ( ) ;
122120
123121 // To be functionally correct we'd send a new request if the method, path, query or body changes.
124122 // But it doesn't seem likely that the method will change and body is likely to be a new
125123 // object even if its shape hasn't changed, so for now we're just watching the path and the query.
126- } , [ path , stringifiedQuery ] ) ;
124+ } , [ path , query ] ) ;
127125
128126 useEffect ( ( ) => {
129127 scheduleRequestRef . current ! ( ) ;
You can’t perform that action at this time.
0 commit comments