router5
meta
)queryParams
option to configure how query parameters are built, and how they are parsedcaseSensitive
option (default to false
)react-router5
router5
useHash
on IE11 fixed when manually changing the URLcaseSensitive
option)[]
(brackets should be removed)trailingSlash
has been renamed to strictTrailingSlash
: by default it is false
useTrailingSlash
has been renamed to trailingSlashMode
with value being 'default'
, 'never'
or 'always'
strictQueryParams
has been renamed to queryParamsMode
with value being 'default'
, 'strict'
or 'loose'
'true'
and 'false'
, null values are stringified without =
sign ({ param: null }
will be stringified to '?param'
). To keep your current behaviour intact, set queryParams.nullFormat
to 'hidden'
and queryParams.booleanFormat
to 'empty-true'
(see options below)'default'
: building follows path definitions'none'
: when building, trailing slash is removed'always'
: when building, trailing slash is added'default'
: a path will match with any query parameters added, but when building, extra parameters won't appear in the returned path.'strict'
: a path with query parameters which were not listed in node definition will cause a match to be unsuccessful. When building, extra parameters won't appear in the returned path.'loose'
: a path will match with any query parameters added, and when building, extra parameters will appear in the returned path.arrayFormat
: Specifies how arrays should be stringified'none'
(default): no brackets or indexes are added to query parameter names ('role=member&role=admin'
)'brackets
: brackets are added to query parameter names ('role[]=member&role[]=admin'
)'index'
: brackets and indexes are added to query parameter names ('role[0]=member&role[1]=admin'
)booleanFormat
: specifies how boolean values are stringified and parsed'none'
(default): booleans are stringified to strings ('istrue=true&isfalse=false'
)'empty-true'
: same as 'none'
except true values are stringified without value ('istrue&isfalse=false'
). If you choose this boolean format, make sure to change the value of 'nullFormat'
.'string'
: same as 'none'
but 'true'
and 'false'
are parsed as booleans'unicode'
: true
and false
are displayed with unicode characters, and parsed as booleans ('istrue=✓&isfalse=✗'
)nullFormat
: specifies how null values are stringified and parsed'default'
(default): null values are stringified without equal sign and value ('isnull'
)'string'
: null values are stringified to 'null'
('isnull=null'
) and parsed as null values'hidden'
: null values are not stringified