Skip to main content

useQueryParams

Recommendation
Updated
Moved
TRIAL
2022-10-07

What is it

useQueryParams is a React Hook, HOC, and Render Props solution for managing state in URL query parameters with easy serialization. useQueryParams allows you to easily encode and decode data of any type as query parameters with smart memoization to prevent creating unnecessary duplicate objects.

When to use it

It's easy to use when you want to create query parameters for your whatever your need might be. It is a bit difficult to understand on how to type the types for each query parameter. It builds on UrlSearchParam and automatically decodes and encodes your query params.

How to learn it

Installation, setup instructions and documentation can be found here. It holds documentation as well as examples.