Skip to content

Migrate from use-query-params to nuqs library for URL state management #4645

@yomybaby

Description

@yomybaby

Background

Currently, the React application uses use-query-params for URL state management. However, this library has limitations when working with React's newer concurrent features, particularly React Transitions. As a result, users may experience delayed feedback when interacting with URL-driven state changes.

Purpose

Modernize URL state management by adopting nuqs, which is specifically designed to handle React Transitions effectively. This will provide:

  • Faster user feedback: Immediate visual responses during state transitions
  • Better React Transition support: Seamless integration with React's concurrent rendering
  • Improved user experience: More responsive UI with optimistic updates and proper loading states

Direction

Replace use-query-params with nuqs throughout the React application to leverage modern URL state management patterns that align with React's evolution toward concurrent rendering and improved user experience.

Expected Outcomes

  • Users see immediate visual feedback when changing filters, tabs, or pagination
  • Smoother transitions between different views and states
  • URL state changes feel more responsive and aligned with modern web application standards
  • Better integration with React's concurrent features for future optimizations

Acceptance Criteria

  • All URL state management uses nuqs instead of use-query-params
  • Type safety is maintained with proper TypeScript types and zod schemas
  • User interactions with URL-driven state (filters, pagination, tabs) feel more responsive
  • All existing functionality continues to work as expected
  • No regressions in URL state synchronization or browser history behavior

JIRA Issue: FR-1683

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions