Maintaining React State in a URL Query String with NextJS

In this video tutorial, I'll demonstrate a useful hook for preserving React state in a URL query string, a feature that's useful when you want to make your application state shareable via a URL. We'll walk through a practical example with a pagination parameter for a NextJS app. Learn how to use `useQueryParamState` and `useHandleQueryParams` hooks, how to ensure the correct value type, and how they can be used in an authentication process. All the components and hooks are available in the ReactKit repository on GitHub. Useful for application developers who wants to enable the sharing of a specific app state or data via a direct link.
Demo: georgiancitizen.com
Source code: github.com/radzionc/radzionkit
Accelerate your work and reach your goals faster with increaser.org - where deep work, time mastery, and habit shaping converge for your success! 💪🚀

Пікірлер: 5

  • @m0192
    @m01927 ай бұрын

    thanks for the video : )

  • @haikelareff
    @haikelareff5 ай бұрын

    ive been trying to find a proper way to create dynamic theme for each route ex: different background color or theme for each category page and based on user profile. can you show me how to do it

  • @raoufcode
    @raoufcode5 ай бұрын

    Hello thanks for this video I'm getting and "NextRouter was not mounted" when trying to use your hook... Surely because of he useRouter...If you can help me handle that, it will be great.. Amazing tutorial though

  • @estebanmurcia8451

    @estebanmurcia8451

    2 ай бұрын

    Make sure you're using the same router, if you're using the latest nextjs version and chose the app router this hook won't work as it uses the pages router