Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: export removeDefaults for end users, or add an option to encodeQueryParams #270

Open
rmmanseau opened this issue Jul 6, 2023 · 0 comments

Comments

@rmmanseau
Copy link

rmmanseau commented Jul 6, 2023

this package is super useful, especially because it exposes a bunch of its internal functions, ie. encodeQueryParams & decodeQueryParams. The hooks API is great if you can use it, but for situations where you need to make some updates without being able to access hooks (ie from a redux thunk) its super useful to be able to drop into the more primitive functions.

one of the ones that is missing, however, is removeDefaults. the only default way for a user to access this functionality is via the hooks API. it can be imported if you specify the full path, "use-query-params/src/removeDefaults", but it breaks webpack for me and its not officially supported & so it might break if the library shuffles around its internals.

it would be great if you could export it, or allow the user to optionally enable it when encodeQueryParams is called. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant