@bigbinary/neeto-commons-frontend 2.1.7 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/react-utils.d.ts CHANGED
@@ -4,6 +4,7 @@ import { Notice } from "@honeybadger-io/js/dist/server/types/core/types";
4
4
  import { History } from "history";
5
5
  import { StoreApi, UseBoundStore } from "zustand";
6
6
  import { UseQueryOptions, UseQueryResult, UseMutationOptions, UseMutationResult } from "react-query";
7
+ import { qsOptionsType, QueryParamsType } from "./utils";
7
8
  /**
8
9
  *
9
10
  * The HoneybadgerErrorBoundary is an ErrorBoundary which reports frontend errors
@@ -1374,4 +1375,22 @@ export const withT: <Props extends {
1374
1375
  */
1375
1376
  export function useMutationWithInvalidation(mutationFn: () => Promise<T>, options: {
1376
1377
  keysToInvalidate: Array<string | string[] | (() => string | string[])>;
1377
- } & UseMutationOptions): UseMutationResult<T>;
1378
+ } & UseMutationOptions): UseMutationResult<T>;
1379
+ /**
1380
+ *
1381
+ * The useQueryParams hook can be used to retrieve the query parameters whenever
1382
+ *
1383
+ * the location changes. A change in location will trigger rerender when using this
1384
+ *
1385
+ * hook.
1386
+ *
1387
+ * This hook will return an object containing all the query parameters. It will
1388
+ *
1389
+ * return an empty object if no query parameters are present.
1390
+ *
1391
+ * @example
1392
+ *
1393
+ * const queryParams = useQueryParams();
1394
+ * @endexample
1395
+ */
1396
+ export function useQueryParams(options?: qsOptionsType): QueryParamsType;