-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
- Support simple types (numbers, strings, booleans)
- Support objects
- Support arrays
- Return array even if single item
- Arrays of simple types
- Arrays of objects
- Handle datatype changing when only a single vs multiple selected (ex. select with a single vs multiple values)
- Provide better errors when config not found (at least include param name)
- Support updating single param with
queryParamsStore- Either support property and only update those with keys passed (require null / undefined to remove) or expose function from store to set
- Support specifying
pushState(browser back) vsreplaceState - Attempt to guess paramType based on default value and/or current params set?
- Might be confusing when breaks in certain conditions
- Consider supporting
Numberand[Number]along with'number'and'number[]'(etc)?- Support both formats?
- What about
json(JSON),object(Object)? - What about
datevsdatetime?- Maybe
Dateis bound todatetimeanddateis handled by passing in an implementation object with encode/decode (see below)
- Maybe
- Support a custom format in the future (UTC date vs local date, etc)
- Maybe passing in an implementation object with encode/decode (see below)
- Consider supporting explicit object with
{encode: ..., decode: ....}? - Differentiate between null and undefined
- Should only undefined delete the value (null is persisted)? Example: active/inactive/all toggles
Useful links
- https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
- Svelte
- React
- Libraries
- https://github.com/sindresorhus/query-string (6.3k)
- https://github.com/ljharb/qs (10.2k - 27.9k)
- https://github.com/lukeed/qss (757b)
Metadata
Metadata
Assignees
Labels
No labels