How to use the serialize-query-params.encodeQueryParams function in serialize-query-params

To help you get started, we’ve selected a few serialize-query-params examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pbeshai / use-query-params / src / useQueryParams.ts View on Github external
(changes: Partial>, updateType?: UrlUpdateType) => {
      // encode as strings for the URL
      const encodedChanges: EncodedQueryWithNulls = encodeQueryParams(
        paramConfigMap,
        changes
      );

      // update the URL
      updateUrlQuery(
        encodedChanges,
        refHistory.current.location || refLocation.current, // see #46
        refHistory.current,
        updateType
      );
    },
    [paramConfigMap]

serialize-query-params

A library for simplifying encoding and decoding URL query parameters.

ISC
Latest version published 2 years ago

Package Health Score

58 / 100
Full package analysis