Skip to content

Releases: pbeshai/use-query-params

v1.0.0

17 Apr 04:13

Choose a tag to compare

Breaking Changes

  • Updates to serialize-query-params v1.0.1

    • #73 #49 #79
    • This changes how empty strings and null are handled. Previously they were auto filtered out / became undefined, but now they are accepted as possible values. foo = null -> ?foo, foo = '' -> ?foo=, foo = undefined -> ? (removes if present--this was current behavior)
    • This means values may be decoded as null, which breaks how you may normally provide default values (const { foo = [] } = query won't work when foo = null). To get around this, a withDefault helper has been added.
    • To provide a default value, wrap your param with withDefault. e.g. useQueryParams({ foo: withDefault(ArrayParam, []) })
    • query-string is no longer directly exported or depended on. It is now a peer dependency, v5.1.1 or v6 will work, you decide what you use.
  • #76 Switches default update type from replaceIn to pushIn

New Features

  • #62 multiple updates in a single render has been fixed thanks to @dprgarner's reworking of how locations passed around internally (see #84, #86)
  • #69 new HOC withQueryParamsMapped has been added that provides a mapToProps API similar to react-redux connect
  • #82 Warns in dev if you forgot to add QueryParamProvider

v0.6.0

10 Jan 22:25

Choose a tag to compare

  • Possibly breaking Updates serialize-query-params to 0.3.0 which now allows empty strings to be valid values in objects. For example: { foo: '' } will now serialize as foo- and deserialize to { foo: '' }. Previously empty string values were discarded and foo- would be deserialized to {foo: undefined }

v0.5

07 Jan 17:09

Choose a tag to compare

  • Resolves #67 by updating serialize-query-params to v0.2.0 (handles values like foo--1 -> foo: "-1" in object serializing)

v0.4.6

19 Dec 13:28

Choose a tag to compare

  • Aims to resolve #57 by running clean before building in prepublishOnly to get rid of old files that caused some people issues.

v0.4.5

16 Nov 14:21

Choose a tag to compare

  • Resolves #54 via #61 - concurrent updates with React Router will now work by looking at history.location instead of the provided location if available.

v0.4.4

10 Nov 13:32

Choose a tag to compare

  • Includes fix for initial values of SSR #58 #51

v0.4.3

21 Oct 12:53

Choose a tag to compare

  • Resolves #55 SSR with useQueryParams

v0.4.2

18 Oct 00:51

Choose a tag to compare

  • Resolves #46 by fixing the way memoization works on the setters returned from useQueryParam and useQueryParams. Also does automatic memoization on the paramConfigMap passed into useQueryParams to prevent it from re-generating new values and setters unnecessarily.

v0.4.1

14 Sep 02:14

Choose a tag to compare

  • Security vulnerabilities fixed and serialize-query-params bumped to 0.1.4

v0.4.0

13 Sep 21:32

Choose a tag to compare

  • Resolves #36 by adding in withUrlParams HOC and <QueryParams> render-props component