@equinor/fusion-query
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,6 +5,11 @@ import { useState } from 'react'; | ||
export const useDebounceQuery = (clientOrClientCtor, options) => { | ||
const [client] = useState(() => clientOrClientCtor instanceof Query ? clientOrClientCtor : new Query(clientOrClientCtor)); | ||
return useDebounce(client.query.bind(client), options); | ||
const [query] = useState(() => { | ||
const client = clientOrClientCtor instanceof Query | ||
? clientOrClientCtor | ||
: new Query(clientOrClientCtor); | ||
return client.query.bind(client); | ||
}); | ||
return useDebounce(query, options); | ||
}; | ||
export default useDebounceQuery; | ||
//# sourceMappingURL=useDebounceQuery.js.map |
{ | ||
"name": "@equinor/fusion-query", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "WIP", | ||
@@ -57,3 +57,3 @@ "private": false, | ||
"dependencies": { | ||
"@equinor/fusion-observable": "^3.0.0", | ||
"@equinor/fusion-observable": "^3.0.1", | ||
"immer": "^9.0.16", | ||
@@ -81,3 +81,3 @@ "rxjs": "^7.5.7", | ||
}, | ||
"gitHead": "b93e25b79c3b34ee46bd3a16b059e850acdffe95" | ||
"gitHead": "3bb1fed86aad515b594dad564444575ef552d87d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159582
1008