Skip to content

v1.0.0

Compare
Choose a tag to compare
@pbeshai pbeshai released this 17 Apr 04:13
· 195 commits to master since this release

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