Skip to content

URL Query Params as the single source of truth for application state #56

@PKulkoRaccoonGang

Description

@PKulkoRaccoonGang

Description

It would be a good idea to explore a strategy where URL Query Params become the primary source of truth for our application state (specifically for search queries, filters, pagination, and sorting) on ​​the Course Catalog page.

Some context

Comment provided by @brian-smith-tcril:

I think an ideal UX would be to always have the URL query params as the source of truth. That would make it so sharing links is much nicer as they would include anything that was searched/filtered for.

This seems to be something that is handled better by Tanstack Router v1 than react-router (see https://tanstack.com/blog/search-params-are-state, https://tanstack.com/router/latest/docs/framework/react/overview#1st-class-search-parameters), but if we already need to handle getting the query from the URL to support searching from the home page moving more of the state into the URL might make it so we can simplify some of the logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions