As of now, if we want to implement a common helper which only handles a portion of search params, but leaves other search params intact, we have to resort to using URLSearchParams object.
Thoughts:
We could add an option for setTypedSearchParams (of useTypedSearchParams), like preserveNonTyped. If true, the given object is merged with URLSearchParams object (containing only non-typed params).
Questions:
Do we need something similar for build* APIs?
Do we need to return restUrlSearchParams: URLSearchParams from useTypedSearchParams?
As of now, if we want to implement a common helper which only handles a portion of search params, but leaves other search params intact, we have to resort to using
URLSearchParams
object.Thoughts:
setTypedSearchParams
(ofuseTypedSearchParams
), likepreserveNonTyped
. Iftrue
, the given object is merged with URLSearchParams object (containing only non-typed params).Questions:
build*
APIs?restUrlSearchParams: URLSearchParams
fromuseTypedSearchParams
?