pbeshai / use-query-params

React Hook for managing state in URL query parameters with easy serialization.

Home Page:https://pbeshai.github.io/use-query-params

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request: Add option to store array params as comma-separated list

nico-martinucci opened this issue · comments

There seem to generally be two accepted methods of storing arrays in params:

?foo=bar&foo=qux

...and...

?foo=bar,qux

This library currently uses the former, but other backend filtering libraries assume params will becoming in formatted like the latter. Would be great to have either a different param type or some sort of option to store array params in the latter format for this purpose.

Try using DelimitedArrayParam for this use case